Package org.ametys.cms.search
Interface SearchResults<A extends AmetysObject>
-
- Type Parameters:
A- the actual type ofAmetysObjects.
- All Known Implementing Classes:
ContentSearchResults,DocumentSearchModuleGenerator.EmptySearchResults,FrontOfficeSearcherFactory.FrontOfficeSolrSearchResults,SolrSearchResults
public interface SearchResults<A extends AmetysObject>
Interface representing the results of a search.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Map<String,Object>>getDebugMap()Gets the response debug map if availableMap<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.floatgetMaxScore()Get the maximum score of all the results.Iterable<String>getObjectIds()Get the result IDs.AmetysObjectIterable<A>getObjects()Get theAmetysObjectresultsSearchResultsIterable<SearchResult<A>>getResults()Get theIterableof the search results.longgetTotalCount()Get the total number of search results.
-
-
-
Method Detail
-
getResults
SearchResultsIterable<SearchResult<A>> getResults()
Get theIterableof the search results.- Returns:
- A
SearchResultsIterableon theSearchResult.
-
getObjects
AmetysObjectIterable<A> getObjects()
Get theAmetysObjectresults- Returns:
- An
AmetysObjectIterableon the results.
-
getObjectIds
Iterable<String> getObjectIds()
Get the result IDs.- Returns:
- An
Iterableon the content IDs.
-
getFacetResults
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.- Returns:
- the facet results.
-
getTotalCount
long getTotalCount()
Get the total number of search results.- Returns:
- the total number of results matching the search (whatever the limit): the iterable may contain less objects than this count.
-
getMaxScore
float getMaxScore()
Get the maximum score of all the results.- Returns:
- the maximum score of all the results.
-
getDebugMap
Optional<Map<String,Object>> getDebugMap()
Gets the response debug map if available- Returns:
- the response debug map if available
-
-