Class CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor
- java.lang.Object
-
- com.broadleafcommerce.search.index.catalog.solr.document.CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor
-
- All Implemented Interfaces:
com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
public class CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor extends Object implements com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
Supports logic during search requests that determine if a product is returned in search results.- See Also:
Product.isAvailableOnline()
-
-
Field Summary
Fields Modifier and Type Field Description static String
VARIANT_BASED_TYPE
static String
VARIANT_ONLINE_PATH
-
Constructor Summary
Constructors Constructor Description CatalogOnlyProductInventoryAvailabilityStrategyDocumentContributor()
-
Method Summary
All Methods Instance Methods Concrete Methods 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 boolean
isAnyVariantAvailable(com.broadleafcommerce.search.catalog.core.domain.Product product, com.jayway.jsonpath.DocumentContext context)
-
-
-
Field Detail
-
VARIANT_BASED_TYPE
public static final String VARIANT_BASED_TYPE
- See Also:
- Constant Field Values
-
VARIANT_ONLINE_PATH
public static final String VARIANT_ONLINE_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 interfacecom.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
isAnyVariantAvailable
protected boolean isAnyVariantAvailable(com.broadleafcommerce.search.catalog.core.domain.Product product, com.jayway.jsonpath.DocumentContext context)
-
canHandle
public boolean canHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
- Specified by:
canHandle
in interfacecom.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
-
-