Class SplitResponseProcessor
java.lang.Object
org.opensearch.search.pipeline.AbstractProcessor
org.opensearch.search.pipeline.common.SplitResponseProcessor
- All Implemented Interfaces:
Processor,SearchResponseProcessor
Processor that sorts an array of items.
Throws exception is the specified field is not an array.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.search.pipeline.Processor
Processor.PipelineContext, Processor.PipelineSource -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOptional key for handling empty trailing fields.static final StringKey defining the delimiter used to split the string.static final StringKey defining the string field to be split.static final StringOptional key to put the split values in a different field.static final StringKey to reference this processor type from a search pipeline. -
Method Summary
Modifier and TypeMethodDescriptionGetter function for separatorGetter function for splitFieldGetter function for targetFieldgetType()booleanGetter function for preserveTrailingprocessResponse(SearchRequest request, SearchResponse response) Methods inherited from class org.opensearch.search.pipeline.AbstractProcessor
getDescription, getTag, isIgnoreFailureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.search.pipeline.Processor
getDescription, getTag, isIgnoreFailureMethods inherited from interface org.opensearch.search.pipeline.SearchResponseProcessor
processResponse, processResponseAsync
-
Field Details
-
TYPE
Key to reference this processor type from a search pipeline.- See Also:
-
SPLIT_FIELD
Key defining the string field to be split.- See Also:
-
SEPARATOR
Key defining the delimiter used to split the string. This can be a regular expression pattern.- See Also:
-
PRESERVE_TRAILING
Optional key for handling empty trailing fields.- See Also:
-
TARGET_FIELD
Optional key to put the split values in a different field.- See Also:
-
-
Method Details
-
getSplitField
Getter function for splitField- Returns:
- sortField
-
getSeparator
Getter function for separator- Returns:
- separator
-
isPreserveTrailing
public boolean isPreserveTrailing()Getter function for preserveTrailing- Returns:
- preserveTrailing;
-
getTargetField
Getter function for targetField- Returns:
- targetField
-
getType
-
processResponse
public SearchResponse processResponse(SearchRequest request, SearchResponse response) throws Exception - Specified by:
processResponsein interfaceSearchResponseProcessor- Throws:
Exception
-