Class ProductSolrDocumentBuilder
- java.lang.Object
-
- com.broadleafcommerce.search.index.core.document.AbstractDocumentBuilder<org.apache.solr.common.SolrInputDocument>
-
- com.broadleafcommerce.search.index.solr.document.DefaultSolrDocumentBuilder
-
- com.broadleafcommerce.search.index.catalog.solr.document.ProductSolrDocumentBuilder
-
- All Implemented Interfaces:
com.broadleafcommerce.search.index.core.document.DocumentBuilder<org.apache.solr.common.SolrInputDocument>
,com.broadleafcommerce.search.index.core.document.IndexableTypeDocumentBuilder<com.broadleafcommerce.search.catalog.core.domain.Product,org.apache.solr.common.SolrInputDocument>
public class ProductSolrDocumentBuilder extends com.broadleafcommerce.search.index.solr.document.DefaultSolrDocumentBuilder implements com.broadleafcommerce.search.index.core.document.IndexableTypeDocumentBuilder<com.broadleafcommerce.search.catalog.core.domain.Product,org.apache.solr.common.SolrInputDocument>
-
-
Constructor Summary
Constructors Constructor Description ProductSolrDocumentBuilder(com.broadleafcommerce.search.index.core.service.IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFieldService, List<com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>> contributors, List<com.broadleafcommerce.search.index.core.document.DocumentBuilderPreProcessor> preProcessors, com.broadleafcommerce.search.provider.solr.SolrFieldService solrFieldService, com.broadleafcommerce.search.index.core.document.helper.DocumentBuilderHelper documentBuilderHelper, ProductOptionSolrDocumentBuilder productOptionSolrDocumentBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.solr.common.SolrInputDocument>
buildDocuments(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
com.broadleafcommerce.search.api.type.IndexableType
getIndexableType()
protected ProductOptionSolrDocumentBuilder
getProductOptionSolrDocumentBuilder()
protected boolean
isSearchOnOption(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, com.jayway.jsonpath.DocumentContext context)
protected boolean
shouldIndex(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
Check whether or not a document should be indexed for this indexable.-
Methods inherited from class com.broadleafcommerce.search.index.solr.document.DefaultSolrDocumentBuilder
buildId, createDocument, getCatalogId, getDocumentBuilderHelper, getSolrFieldService, idMapEntryToString, isEmptyOrNull, populateDocument
-
Methods inherited from class com.broadleafcommerce.search.index.core.document.AbstractDocumentBuilder
executeContributors, executePreProcessors, getContributorsForIndexableType, getDefaultContributors, getDefaultJsonPathConfiguration, getIndexableTypeContributors, getJsonPathConfiguration, getPreProcessors, getSearchFieldService
-
-
-
-
Constructor Detail
-
ProductSolrDocumentBuilder
public ProductSolrDocumentBuilder(com.broadleafcommerce.search.index.core.service.IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFieldService, List<com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>> contributors, List<com.broadleafcommerce.search.index.core.document.DocumentBuilderPreProcessor> preProcessors, com.broadleafcommerce.search.provider.solr.SolrFieldService solrFieldService, com.broadleafcommerce.search.index.core.document.helper.DocumentBuilderHelper documentBuilderHelper, ProductOptionSolrDocumentBuilder productOptionSolrDocumentBuilder)
-
-
Method Detail
-
shouldIndex
protected boolean shouldIndex(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
Check whether or not a document should be indexed for this indexable.This implementation excludes non-searchable products.
- Overrides:
shouldIndex
in classcom.broadleafcommerce.search.index.core.document.AbstractDocumentBuilder<org.apache.solr.common.SolrInputDocument>
- Parameters:
indexable
- The indexable to check- Returns:
- Whether or not a document should be indexed
-
buildDocuments
public List<org.apache.solr.common.SolrInputDocument> buildDocuments(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables) throws com.broadleafcommerce.search.api.SearchIndexException
- Specified by:
buildDocuments
in interfacecom.broadleafcommerce.search.index.core.document.DocumentBuilder<org.apache.solr.common.SolrInputDocument>
- Overrides:
buildDocuments
in classcom.broadleafcommerce.search.index.core.document.AbstractDocumentBuilder<org.apache.solr.common.SolrInputDocument>
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
isSearchOnOption
protected boolean isSearchOnOption(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, com.jayway.jsonpath.DocumentContext context)
-
getIndexableType
public com.broadleafcommerce.search.api.type.IndexableType getIndexableType()
- Specified by:
getIndexableType
in interfacecom.broadleafcommerce.search.index.core.document.IndexableTypeDocumentBuilder<com.broadleafcommerce.search.catalog.core.domain.Product,org.apache.solr.common.SolrInputDocument>
-
getProductOptionSolrDocumentBuilder
protected ProductOptionSolrDocumentBuilder getProductOptionSolrDocumentBuilder()
-
-