Interface DocumentPreProcessor

All Known Implementing Classes:
AsciiFoldingDataProcessor, AttributeToDataFieldConverter, ConfigureableDataprocessor, ExtractCategoryLevelDataProcessor, FlagFieldDataProcessor, RemoveFieldContentDelimiterProcessor, RemoveValuesDataProcessor, ReplacePatternInValuesDataProcessor, SkipDocumentDataProcessor, SplitValueDataProcessor, WordSplitterDataProcessor

public interface DocumentPreProcessor
DocumentPreProcessor implementations can be used to alter product data before they get transformed into IndexableItems. Several implementations can be configured to run one after another, where each processor get's the manipulated record value of the former processor.
Author:
hjk, rb
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    finish(boolean success)
    optional callback about pre-processing done for all documents
    void
    initialize(FieldConfigAccess fieldConfig, Map<String,String> preProcessorConfig)
    DataPreProcessor MUST have a no-args constructor.
    boolean
    process(Document sourceDocument, boolean visible)
    Called for each source document.
  • Method Details

    • initialize

      void initialize(FieldConfigAccess fieldConfig, Map<String,String> preProcessorConfig)
      DataPreProcessor MUST have a no-args constructor. To configure it afterwards, this method will be used.
      Parameters:
      fieldConfig - field config access
      preProcessorConfig - custom string-to-string map that can be configured per DocumentPreProcessor.
    • process

      boolean process(Document sourceDocument, boolean visible)
      Called for each source document.
      Parameters:
      sourceDocument - source document
      visible - weather or not the record is currently marked for indexing.
      Returns:
      true if the record should be indexed, false otherwise.
    • finish

      default void finish(boolean success)
      optional callback about pre-processing done for all documents
      Parameters:
      success - true if a complete indexing was finished successfully or not.