Package de.cxp.ocs.preprocessor.impl
Class ExtractCategoryLevelDataProcessor
java.lang.Object
de.cxp.ocs.preprocessor.impl.ExtractCategoryLevelDataProcessor
- All Implemented Interfaces:
DocumentPreProcessor
Extracts the category levels of a single category path field into separate
level and a leaf field if the *lvl and *leaf fields exists in the field
configuration. Example:
source: category: [A/B/C/D, Z/X/Y] becomes: category_lvl_0: A,Z category_lvl_1: B,X category_lvl_2: C,Y category_lvl_3: D category_leaf: D,YWill be auto configured if the following configuration entry is present:
data-processor-configuration:
processors:
- ExtractCategoryLevelDataProcessor
- Author:
- hjk
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(FieldConfigAccess fieldConfig, Map<String, String> preProcessorConfig) DataPreProcessor MUST have a no-args constructor.booleanCalled for each source document.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.cxp.ocs.spi.indexer.DocumentPreProcessor
finish
-
Constructor Details
-
ExtractCategoryLevelDataProcessor
public ExtractCategoryLevelDataProcessor()
-
-
Method Details
-
initialize
Description copied from interface:DocumentPreProcessorDataPreProcessor MUST have a no-args constructor. To configure it afterwards, this method will be used.- Specified by:
initializein interfaceDocumentPreProcessor- Parameters:
fieldConfig- field config accesspreProcessorConfig- custom string-to-string map that can be configured per DocumentPreProcessor.
-
process
Description copied from interface:DocumentPreProcessorCalled for each source document.- Specified by:
processin interfaceDocumentPreProcessor- Parameters:
document- source documentvisible- weather or not the record is currently marked for indexing.- Returns:
trueif the record should be indexed,falseotherwise.
-