Class VendorDiscriminatedSolrDocumentBuilderContributor

java.lang.Object
com.broadleafcommerce.search.index.solr.document.VendorDiscriminatedSolrDocumentBuilderContributor
All Implemented Interfaces:
com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>

public class VendorDiscriminatedSolrDocumentBuilderContributor extends Object implements com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
Contributes vendor discrimination information to the Solr document
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
     
    void
    contributeInternal(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, org.apache.solr.common.SolrInputDocument document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields)
     
    protected String
    getVendorRef(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
    Get the vendor ref to index for this indexable object.

    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.index.core.document.DocumentBuilderContributor

    contribute
  • Constructor Details

    • VendorDiscriminatedSolrDocumentBuilderContributor

      public VendorDiscriminatedSolrDocumentBuilderContributor()
  • Method Details

    • contributeInternal

      public void contributeInternal(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, org.apache.solr.common.SolrInputDocument document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields) throws com.broadleafcommerce.search.api.SearchIndexException
      Specified by:
      contributeInternal in interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException
    • getVendorRef

      @Nullable protected String getVendorRef(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
      Get the vendor ref to index for this indexable object.
      Parameters:
      indexable - the indexable to retrieve the vendor ref for
      Returns:
      the vendor ref of the indexable
    • canHandle

      public boolean canHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
      Specified by:
      canHandle in interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>