mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +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)
|
||||
throws BrowseException {
|
||||
DiscoverQuery query = new DiscoverQuery();
|
||||
query.setQuery("search.resourceid:" + itemID
|
||||
+ " AND search.resourcetype:" + IndexableItem.TYPE);
|
||||
query.setQuery("*:*");
|
||||
query.addFilterQueries(
|
||||
RESOURCE_ID_FIELD + ":" + itemID,
|
||||
RESOURCE_TYPE_FIELD + ":" + IndexableItem.TYPE);
|
||||
query.setMaxResults(1);
|
||||
DiscoverResult resp = null;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user