Hi,
I want to copy values from multiple fields into single field using split pipeline.
Below is the pipeline I have created, I am copying field values from title and abstract to suggest field.
[
{
"split": {
"field": "title",
"separator": "\\s+",
"target_field": "suggest",
"ignore_missing": true
}
},
{
"split": {
"field": "abstract",
"separator": "\\s+",
"target_field": "suggest",
"ignore_missing": true
}
}
]
The issue I am facing here is the field values are getting ovverriden. for Example.
POST /_ingest/pipeline/split_pipeline/_simulate
{
"docs": [
{
"_source": {
"title": "value1 value2",
"abstract": "value3 value4"
}
}
]
}
Above query is returning below output
{
"docs": [
{
"doc": {
"_index": "_index",
"_version": "-3",
"_id": "_id",
"_source": {
"abstract": "value3 value4",
"suggest": [
"value3",
"value4"
],
"title": "value1 value2"
},
"_ingest": {
"timestamp": "2024-12-02T19:07:43.091134491Z"
}
}
}
]
}
However I want the below output.
{
"docs": [
{
"doc": {
"_index": "_index",
"_version": "-3",
"_id": "_id",
"_source": {
"abstract": "value3 value4",
"suggest": [
"value1",
"value2",
"value3",
"value4"
],
"title": "value1 value2"
},
"_ingest": {
"timestamp": "2024-12-02T19:07:43.091134491Z"
}
}
}
]
}
Can somebody help me how can I achieve it through split_pipeline (I don't want to use copy_To functionality)??