Split Processor
This processor splits a document into multiple one based on the split strategy (configurable). The current implemented strategies are:
Split Strategies
Multi-value field
- Takes a multi-value field and create a document for each value.
- The rest of the fields are copied as they come.
- Each value in the multi-value field is copied to a configurable output value.
For example, let's assume the following document:
{
"arrayField":["a", "b", "c"],
"otherField": "d"
}
If the arrayField
is set as the split field, the it will produce three documents:
[
{
"arrayField":["a", "b", "c"],
"otherField": "d",
"outputField": ["a"]
},
{
"arrayField":["a", "b", "c"],
"otherField": "d",
"outputField": ["b"]
},
{
"arrayField":["a", "b", "c"],
"otherField": "d",
"outputField": ["c"]
}
]
Configuration
Example configuration in a processor:
{
"strategy":"multiValueField",
"splitField":"fieldToSplitOn",
"outputField":"fieldAfterSplit",
"name": "Split processor",
"type": "split-processor"
}
Configuration parameters:
strategy
(Required, String) Split strategy to use.
splitField
(Required, String) The name of the multi-value field to split on.
outputField
(Required, String) The name of the field where each value of the output field is copied to.