Hello,
I want to concatenate/combine/merge two or three fields and assign this combined value to new field (mapping created for new field) after indexing. could you please suggest how to do this? Thanks!
Hello,
I want to concatenate/combine/merge two or three fields and assign this combined value to new field (mapping created for new field) after indexing. could you please suggest how to do this? Thanks!
You can use Set Processor.
PUT _ingest/pipeline/append-pipeline
{
"description": "append name and surname",
"processors": [
{
"set": {
"field": "_source.full_name",
"value": "{{_source.name}} {{_source.surname}}"
}
}
]
}
POST idx_test/_doc?pipeline=append-pipeline
{
"name":"xpto",
"surname": "001"
}
GET idx_test/_search
Response:
"hits": [
{
"_index": "idx_test",
"_id": "7XotIIQB3Jb-Mgr45_fj",
"_score": 1,
"_source": {
"name": "xpto",
"surname": "001",
"full_name": "xpto 001"
}
}
]
Thank you @RabBit_BR, I will try this out.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.