Class AbstractSolrQueryContributor
- java.lang.Object
-
- com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
-
- All Implemented Interfaces:
SolrQueryContributor,org.springframework.core.Ordered
- Direct Known Subclasses:
ApplicationTrackableSolrQueryContributor,CatalogTrackableSolrQueryContributor,CustomerContextTrackableSolrQueryContributor,DefaultSolrActiveDateContributor,DefaultSolrFacetContributor,DefaultSolrFilterContributor,DefaultSolrSearchFieldContributor,DefaultSolrSortContributor,DefaultSolrSpellCheckContributor,QueryTypeSolrQueryContributor,SandboxTrackableSolrQueryContributor,TenantTrackableSolrQueryContributor,VendorDiscriminationSolrQueryContributor
public abstract class AbstractSolrQueryContributor extends Object implements SolrQueryContributor
AbstractSolrQueryContributorwhich supports easily indicating if a contributor should be run or not.
-
-
Constructor Summary
Constructors Constructor Description AbstractSolrQueryContributor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcontribute(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, String locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Customize the providedsolrQuerywith some additional behavior.protected abstract voidcontributeInternal(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, String locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Customize the providedsolrQuerywith some additional behavior.protected abstract booleanshouldContribute(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Determines if this contributor should run.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.search.provider.solr.SolrQueryContributor
contributeOnTypeAhead, getOrder, isTypeAheadRequest
-
-
-
-
Method Detail
-
contribute
public void contribute(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, @Nullable String locale, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Description copied from interface:SolrQueryContributorCustomize the providedsolrQuerywith some additional behavior.- Specified by:
contributein interfaceSolrQueryContributor- Parameters:
solrQuery- The query to customizesearchRequest- The search query requestfieldDefinitions- The fields to perform the search onpage- Page information for page to retrieve for queryproperties- Additional properties for this searchlocale- (optional) the locale of the querycontext- The context information surrounding sandboxing/multitenant state
-
contributeInternal
protected abstract void contributeInternal(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, @Nullable String locale, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Customize the providedsolrQuerywith some additional behavior.- Parameters:
solrQuery- The query to customizesearchRequest- The search query requestfieldDefinitions- The fields to perform the search onpage- Page information for page to retrieve for queryproperties- Additional properties for this querylocale- The locale of this searchcontext- The context information surrounding sandboxing/multitenant state
-
shouldContribute
protected abstract boolean shouldContribute(org.apache.solr.client.solrj.SolrQuery solrQuery, com.broadleafcommerce.search.api.domain.SearchRequest searchRequest, org.springframework.data.domain.Pageable page, com.broadleafcommerce.search.core.service.SearchRequestProperties properties, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Determines if this contributor should run.- Parameters:
solrQuery- The query to customizesearchRequest- The search query requestpage- Page information for page to retrieve for queryproperties- Additional properties for this query.context- The context information surrounding sandboxing/multitenant state- Returns:
- whether this contributor should run
-
-