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:
Tim Donohue
2015-11-05 10:37:11 -06:00
parent eeed870fb2
commit c9f5ccbe42
2 changed files with 56 additions and 24 deletions

View File

@@ -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;
}