Package org.ametys.web.frontoffice
Class FrontOfficeSearcherFactory.FrontOfficeSolrSearchResults<A extends AmetysObject>
java.lang.Object
org.ametys.web.frontoffice.FrontOfficeSearcherFactory.FrontOfficeSolrSearchResults<A>
- Type Parameters:
A
- the actual type ofAmetysObject
s.
- All Implemented Interfaces:
SearchResults<A>
- Enclosing class:
- FrontOfficeSearcherFactory
public static class FrontOfficeSearcherFactory.FrontOfficeSolrSearchResults<A extends AmetysObject>
extends Object
implements SearchResults<A>
Wrapper of a
SolrSearchResults
for AbstractSearchGenerator
(add the possibility to add facet.queries)-
Constructor Summary
ConstructorDescriptionFrontOfficeSolrSearchResults
(SearchResults<A> searchResults, org.apache.solr.client.solrj.response.QueryResponse response, Map<String, Integer> facetQueryResults) Build a FrontOfficeSolrSearchResults object. -
Method Summary
Modifier and TypeMethodDescriptionGets the response debug map if availableGets the facet.query results as a MapGet the facet results as a Map, indexed by faceted criterion ID.
The Map values are represented by a Map of value -> result count.float
Get the maximum score of all the results.Get the result IDs.Get theAmetysObject
resultsGet theIterable
of the search results.long
Get the total number of search results.
-
Constructor Details
-
FrontOfficeSolrSearchResults
public FrontOfficeSolrSearchResults(SearchResults<A> searchResults, org.apache.solr.client.solrj.response.QueryResponse response, Map<String, Integer> facetQueryResults) Build a FrontOfficeSolrSearchResults object.- Parameters:
searchResults
- The wrappedSearchResults
objectresponse
- the solr search response.facetQueryResults
- The facet.query results.
-
-
Method Details
-
getResults
Description copied from interface:SearchResults
Get theIterable
of the search results.- Specified by:
getResults
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- A
SearchResultsIterable
on theSearchResult
.
-
getObjects
Description copied from interface:SearchResults
Get theAmetysObject
results- Specified by:
getObjects
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- An
AmetysObjectIterable
on the results.
-
getObjectIds
Description copied from interface:SearchResults
Get the result IDs.- Specified by:
getObjectIds
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- An
Iterable
on the content IDs.
-
getFacetResults
Description copied from interface:SearchResults
Get the facet results as a Map, indexed by faceted criterion ID.
The Map values are represented by a Map of value -> result count.- Specified by:
getFacetResults
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- the facet results.
-
getFacetQueryResults
Gets the facet.query results as a Map- Returns:
- the facet.query results
-
getTotalCount
Description copied from interface:SearchResults
Get the total number of search results.- Specified by:
getTotalCount
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- the total number of results matching the search (whatever the limit): the iterable may contain less objects than this count.
-
getMaxScore
Description copied from interface:SearchResults
Get the maximum score of all the results.- Specified by:
getMaxScore
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- the maximum score of all the results.
-
getDebugMap
Description copied from interface:SearchResults
Gets the response debug map if available- Specified by:
getDebugMap
in interfaceSearchResults<A extends AmetysObject>
- Returns:
- the response debug map if available
-