Class SearchAndReplaceStep

  • All Implemented Interfaces:
    AutoCloseable, Function<Stream<Event>,​Stream<Event>>, IPipelineStep

    public class SearchAndReplaceStep
    extends BasePipelineStep
    This step performs search and replace actions on either the text units or the full content of input documents. Source and/or target content can be searched and replaced. Takes: Raw document or Filter events. Sends: same as the input. The step provides a way to define a list of search entries and corresponding replacements. You can use regular expressions if needed. The step can take as input either a raw document or filter events. If the step receives filter events, the search and replace is done on the content of the text units, and the step sends updated filter events to the next step. If the step receives a raw document, the search and replace is done on the whole file, and the step sends an updated raw document to the next step. Note that in this case, the raw document must be in some text-based file format for the search and replace to work: The document is seen exactly like it would be in a text editor (no conversion of escaped characters is done for example).
    Author:
    Fredrik L., Yves S., HargraveJE