mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
DS-2869: Ensure all Solr queries specify fields to return. Refactor slightly to use global constants for objId fields. Add comments to DiscoverQuery.
Conflicts: dspace-api/src/main/java/org/dspace/discovery/SolrServiceImpl.java
This commit is contained in:
@@ -218,10 +218,20 @@ public class DiscoverQuery {
|
||||
this.facetOffset = facetOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the fields which you want Discovery to return in the search results.
|
||||
* It is HIGHLY recommended to limit the fields returned, as by default
|
||||
* some backends (like Solr) will return everything.
|
||||
* @param field field to add to the list of fields returned
|
||||
*/
|
||||
public void addSearchField(String field){
|
||||
this.searchFields.add(field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of fields which Discovery will return in the search results
|
||||
* @return List of field names
|
||||
*/
|
||||
public List<String> getSearchFields() {
|
||||
return searchFields;
|
||||
}
|
||||
|
Reference in New Issue
Block a user