Interface DocumentBuilderContributor<T>
- Type Parameters:
- T- The type of the document being modified
- All Known Subinterfaces:
- IndexableTypeDocumentBuilderContributor<T>
public interface DocumentBuilderContributor<T>
Responsible for further contributing to a populated search document. This interface should be
 implemented if the user intends to enhance an indexable search document with additional
 information.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable) Determines whether this contributor should contributedefault voidcontribute(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields) Enhances an indexable document with additional information.voidcontributeInternal(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields) Enhances an indexable document with additional information.
- 
Method Details- 
contributedefault void contribute(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields) throws com.broadleafcommerce.search.api.SearchIndexException Enhances an indexable document with additional information.- Parameters:
- indexable- The indexable type.
- document- The search document to be enhanced.
- context- An initialized context with all properties from the Indexable mapped and available via JSON paths.
- searchFields- The search fields for this IndexableType.
- Throws:
- com.broadleafcommerce.search.api.SearchIndexException- if an error occurs preventing indexing
 
- 
contributeInternalvoid contributeInternal(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields) throws com.broadleafcommerce.search.api.SearchIndexException Enhances an indexable document with additional information.- Parameters:
- indexable- The indexable type.
- document- The search document to be enhanced.
- context- An initialized context with all properties from the Indexable mapped and available via JSON paths.
- searchFields- The search fields for this IndexableType.
- Throws:
- com.broadleafcommerce.search.api.SearchIndexException- if an error occurs preventing indexing
 
- 
canHandleboolean canHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable) Determines whether this contributor should contribute- Parameters:
- indexable- The Indexable item.
- Returns:
- true if this contributor should execute, else false.
 
 
-