A - the actual type of AmetysObjects.public class SolrSearchResults<A extends AmetysObject> extends Object implements SearchResults<A>
SearchResults.| Modifier and Type | Field and Description |
|---|---|
protected SolrDocumentList |
_docList
The Solr documents of the search response
|
protected Map<String,Map<String,Integer>> |
_facetResults
The facet results.
|
protected AmetysObjectResolver |
_resolver
The AmetysObject resolver.
|
protected QueryResponse |
_response
The solr query response
|
| Constructor and Description |
|---|
SolrSearchResults(QueryResponse response,
AmetysObjectResolver resolver,
Map<String,Map<String,Integer>> facetResults)
Build a SolrSearchResults object.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Map<String,Object>> |
getDebugMap()
Gets the response debug map if available
|
Map<String,Map<String,Integer>> |
getFacetResults()
Get the facet results as a Map, indexed by faceted criterion ID.
The Map values are represented by a Map of value -> result count. |
float |
getMaxScore()
Get the maximum score of all the results.
|
Iterable<String> |
getObjectIds()
Get the result IDs.
|
AmetysObjectIterable<A> |
getObjects()
Get the
AmetysObject results |
SearchResultsIterable<SearchResult<A>> |
getResults()
Get the
Iterable of the search results. |
long |
getTotalCount()
Get the total number of search results.
|
protected QueryResponse _response
protected SolrDocumentList _docList
protected AmetysObjectResolver _resolver
public SolrSearchResults(QueryResponse response, AmetysObjectResolver resolver, Map<String,Map<String,Integer>> facetResults)
response - the solr search response.resolver - The Ametys object resolver.facetResults - The facet results.public SearchResultsIterable<SearchResult<A>> getResults()
SearchResultsIterable of the search results.getResults in interface SearchResults<A extends AmetysObject>SearchResultsIterable on the SearchResult.public AmetysObjectIterable<A> getObjects()
SearchResultsAmetysObject resultsgetObjects in interface SearchResults<A extends AmetysObject>AmetysObjectIterable on the results.public Iterable<String> getObjectIds()
SearchResultsgetObjectIds in interface SearchResults<A extends AmetysObject>Iterable on the content IDs.public Map<String,Map<String,Integer>> getFacetResults()
SearchResultsgetFacetResults in interface SearchResults<A extends AmetysObject>public long getTotalCount()
SearchResultsgetTotalCount in interface SearchResults<A extends AmetysObject>public float getMaxScore()
SearchResultsgetMaxScore in interface SearchResults<A extends AmetysObject>public Optional<Map<String,Object>> getDebugMap()
SearchResultsgetDebugMap in interface SearchResults<A extends AmetysObject>