public class FrontOfficeSearcherFactory.FrontOfficeSearcher extends SearcherFactory.Searcher
AbstractSearchGenerator
Modifier and Type | Field and Description |
---|---|
private Collection<FrontOfficeSearcherFactory.QueryFacet> |
_queryFacets |
private Collection<String> |
_queryFacetValues |
Modifier | Constructor and Description |
---|---|
protected |
FrontOfficeSearcher(Logger logger)
Build a Searcher with default values.
|
Modifier and Type | Method and Description |
---|---|
<A extends AmetysObject> |
_buildResults(QueryResponse response,
List<SearchField> facets)
From the Solr server response, builds the
SearchResults object. |
protected void |
modifySolrQuery(SolrQuery query)
Template method to do additional operations on the Solr query before passing it to the Solr client
|
FrontOfficeSearcherFactory.FrontOfficeSearcher |
withQueryFacets(Collection<FrontOfficeSearcherFactory.QueryFacet> queryFacets)
Sets the query facets (facet.query parameters)
|
FrontOfficeSearcherFactory.FrontOfficeSearcher |
withQueryFacetValues(Collection<String> queryFacetValues)
Set the facet.query values
|
addContextElement, addFacet, addFilterQuery, addFilterQueryString, addSort, getFacetResults, getFilterQueries, getQuery, getSolrQuery, search, searchWithFacets, setCheckRights, setFacets, setSort, withContext, withFacets, withFacets, withFacetValues, withFilterQueries, withFilterQueries, withFilterQueryStrings, withFilterQueryStrings, withLimits, withQuery, withQueryString, withSort, withSort
private Collection<FrontOfficeSearcherFactory.QueryFacet> _queryFacets
private Collection<String> _queryFacetValues
protected FrontOfficeSearcher(Logger logger)
logger
- The logger.public FrontOfficeSearcherFactory.FrontOfficeSearcher withQueryFacets(Collection<FrontOfficeSearcherFactory.QueryFacet> queryFacets)
queryFacets
- The facetspublic FrontOfficeSearcherFactory.FrontOfficeSearcher withQueryFacetValues(Collection<String> queryFacetValues)
queryFacetValues
- The valuesprotected void modifySolrQuery(SolrQuery query)
SearcherFactory.Searcher
modifySolrQuery
in class SearcherFactory.Searcher
query
- the Solr querypublic <A extends AmetysObject> SearchResults<A> _buildResults(QueryResponse response, List<SearchField> facets) throws Exception
SearcherFactory.Searcher
SearchResults
object._buildResults
in class SearcherFactory.Searcher
A
- The type of search resultsresponse
- The response from the Solr serverfacets
- The facet fields to returnException
- If an error occurs.