Class DefaultSolrSearchFieldContributor
java.lang.Object
com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
com.broadleafcommerce.search.provider.solr.DefaultSolrSearchFieldContributor
- All Implemented Interfaces:
SolrQueryContributor
,org.springframework.core.Ordered
Sets Solr's "fl" value to designate which fields should be returned in a search response.
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSolrSearchFieldContributor
(com.broadleafcommerce.search.provider.solr.SolrFieldService solrFieldService) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, String locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Customize the providedsolrQuery
with some additional behavior.boolean
TypeAhead handles its own search fields, so we don't contribute.protected List<com.broadleafcommerce.search.api.domain.FieldVariant>
filterIncludeInResponseVariants
(List<com.broadleafcommerce.search.api.domain.FieldDefinition> fieldDefinitions) protected com.broadleafcommerce.search.autoconfigure.SearchSettingsProperties
protected com.broadleafcommerce.search.provider.solr.SolrFieldService
void
setSearchSettingsProperties
(com.broadleafcommerce.search.autoconfigure.SearchSettingsProperties searchSettingsProperties) protected 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, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Determines if this contributor should run.Methods inherited from class com.broadleafcommerce.search.provider.solr.AbstractSolrQueryContributor
contribute
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
getOrder, isTypeAheadRequest
-
Constructor Details
-
DefaultSolrSearchFieldContributor
public DefaultSolrSearchFieldContributor(com.broadleafcommerce.search.provider.solr.SolrFieldService solrFieldService)
-
-
Method Details
-
contributeInternal
protected 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) Description copied from class:AbstractSolrQueryContributor
Customize the providedsolrQuery
with some additional behavior.- Specified by:
contributeInternal
in classAbstractSolrQueryContributor
- 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
-
filterIncludeInResponseVariants
-
shouldContribute
protected 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) Description copied from class:AbstractSolrQueryContributor
Determines if this contributor should run.- Specified by:
shouldContribute
in classAbstractSolrQueryContributor
- 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
-
contributeOnTypeAhead
public boolean contributeOnTypeAhead()TypeAhead handles its own search fields, so we don't contribute.- Returns:
- Should this contributor be executed on TypeAhead requests?
-
getSolrFieldService
protected com.broadleafcommerce.search.provider.solr.SolrFieldService getSolrFieldService() -
getSearchSettingsProperties
protected com.broadleafcommerce.search.autoconfigure.SearchSettingsProperties getSearchSettingsProperties() -
setSearchSettingsProperties
@Autowired public void setSearchSettingsProperties(com.broadleafcommerce.search.autoconfigure.SearchSettingsProperties searchSettingsProperties)
-