Class SplitResponseProcessor

java.lang.Object
org.opensearch.search.pipeline.AbstractProcessor
org.opensearch.search.pipeline.common.SplitResponseProcessor
All Implemented Interfaces:
Processor, SearchResponseProcessor

public class SplitResponseProcessor extends AbstractProcessor implements SearchResponseProcessor
Processor that sorts an array of items. Throws exception is the specified field is not an array.
  • Field Details

    • TYPE

      public static final String TYPE
      Key to reference this processor type from a search pipeline.
      See Also:
    • SPLIT_FIELD

      public static final String SPLIT_FIELD
      Key defining the string field to be split.
      See Also:
    • SEPARATOR

      public static final String SEPARATOR
      Key defining the delimiter used to split the string. This can be a regular expression pattern.
      See Also:
    • PRESERVE_TRAILING

      public static final String PRESERVE_TRAILING
      Optional key for handling empty trailing fields.
      See Also:
    • TARGET_FIELD

      public static final String TARGET_FIELD
      Optional key to put the split values in a different field.
      See Also:
  • Method Details

    • getSplitField

      public String getSplitField()
      Getter function for splitField
      Returns:
      sortField
    • getSeparator

      public String getSeparator()
      Getter function for separator
      Returns:
      separator
    • isPreserveTrailing

      public boolean isPreserveTrailing()
      Getter function for preserveTrailing
      Returns:
      preserveTrailing;
    • getTargetField

      public String getTargetField()
      Getter function for targetField
      Returns:
      targetField
    • getType

      public String getType()
      Specified by:
      getType in interface Processor
    • processResponse

      public SearchResponse processResponse(SearchRequest request, SearchResponse response) throws Exception
      Specified by:
      processResponse in interface SearchResponseProcessor
      Throws:
      Exception