Class AbstractSolrQueryContributor

    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      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, String locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Customize the provided solrQuery with some additional behavior.
      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, String locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Customize the provided solrQuery with some additional behavior.
      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, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Determines if this contributor should run.
    • Constructor Detail

      • AbstractSolrQueryContributor

        public AbstractSolrQueryContributor()
    • 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: SolrQueryContributor
        Customize the provided solrQuery with some additional behavior.
        Specified by:
        contribute in interface SolrQueryContributor
        Parameters:
        solrQuery - The query to customize
        searchRequest - The search query request
        fieldDefinitions - The fields to perform the search on
        page - Page information for page to retrieve for query
        properties - Additional properties for this search
        locale - (optional) the locale of the query
        context - 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 provided solrQuery with some additional behavior.
        Parameters:
        solrQuery - The query to customize
        searchRequest - The search query request
        fieldDefinitions - The fields to perform the search on
        page - Page information for page to retrieve for query
        properties - Additional properties for this query
        locale - The locale of this search
        context - 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 customize
        searchRequest - The search query request
        page - Page information for page to retrieve for query
        properties - Additional properties for this query.
        context - The context information surrounding sandboxing/multitenant state
        Returns:
        whether this contributor should run