Class CatalogDocumentBuilderImpl

java.lang.Object
org.broadleafcommerce.core.search.service.solr.indexer.CatalogDocumentBuilderImpl
All Implemented Interfaces:
CatalogDocumentBuilder, DocumentBuilder

@Component("blCatalogDocumentBuilder") public class CatalogDocumentBuilderImpl extends Object implements CatalogDocumentBuilder
Default implementation of the DocumentBuilder to build SolrInputDocuments from Products.
Author:
Kelly Tisdell
  • Field Details

    • shs

      protected SolrHelperService shs
    • extensionManager

      protected SolrIndexServiceExtensionManager extensionManager
    • solrConfiguration

      @Qualifier("blCatalogSolrConfiguration") @Autowired(required=false) protected SolrConfiguration solrConfiguration
    • sandBoxHelper

      protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
  • Constructor Details

    • CatalogDocumentBuilderImpl

      public CatalogDocumentBuilderImpl()
  • Method Details

    • buildDocument

      public org.apache.solr.common.SolrInputDocument buildDocument(Indexable indexable, List<IndexField> fields, List<org.broadleafcommerce.common.locale.domain.Locale> locales)
      Specified by:
      buildDocument in interface DocumentBuilder
    • attachIndexableDocumentFields

      protected void attachIndexableDocumentFields(org.apache.solr.common.SolrInputDocument document, Indexable indexable, List<IndexField> fields, List<org.broadleafcommerce.common.locale.domain.Locale> locales)
    • attachAdditionalDocumentFields

      protected void attachAdditionalDocumentFields(Indexable indexable, org.apache.solr.common.SolrInputDocument document)
    • attachBasicDocumentFields

      protected void attachBasicDocumentFields(Indexable indexable, org.apache.solr.common.SolrInputDocument document)
    • buildFullCategoryHierarchy

      protected void buildFullCategoryHierarchy(org.apache.solr.common.SolrInputDocument document, CatalogStructure cache, Long categoryId, Set<Long> indexedParents)
    • getPropertyValues

      protected Map<String,Object> getPropertyValues(Indexable indexedItem, Field field, FieldType fieldType, List<org.broadleafcommerce.common.locale.domain.Locale> locales) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
      Throws:
      IllegalAccessException
      InvocationTargetException
      NoSuchMethodException
    • convertDisplayOrderToLong

      protected Long convertDisplayOrderToLong(CatalogStructure cache, String displayOrderKey)
      We multiply the BigDecimal by 1,000,000 to maintain any possible decimals in use the displayOrder value.
      Parameters:
      cache -
      displayOrderKey -
      Returns:
    • modifyDocument

      protected void modifyDocument(Indexable indexable, List<IndexField> fields, List<org.broadleafcommerce.common.locale.domain.Locale> locales)
      This is a simple hook point to allow implementors to override and modify the documents after the default functionality has created them.
      Parameters:
      indexable -
      fields -
      locales -