mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
use filter query instead of generic query
This commit is contained in:
@@ -325,8 +325,10 @@ public class SolrBrowseDAO implements BrowseDAO {
|
|||||||
public String doMaxQuery(String column, String table, int itemID)
|
public String doMaxQuery(String column, String table, int itemID)
|
||||||
throws BrowseException {
|
throws BrowseException {
|
||||||
DiscoverQuery query = new DiscoverQuery();
|
DiscoverQuery query = new DiscoverQuery();
|
||||||
query.setQuery("search.resourceid:" + itemID
|
query.setQuery("*:*");
|
||||||
+ " AND search.resourcetype:" + IndexableItem.TYPE);
|
query.addFilterQueries(
|
||||||
|
RESOURCE_ID_FIELD + ":" + itemID,
|
||||||
|
RESOURCE_TYPE_FIELD + ":" + IndexableItem.TYPE);
|
||||||
query.setMaxResults(1);
|
query.setMaxResults(1);
|
||||||
DiscoverResult resp = null;
|
DiscoverResult resp = null;
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user