I am trying to concatenate two fields firstName and last name to build a field as fullName. After some R&D I have found copy-to feature in mapping that can help to copy fields to a certain field. But here I am trying to copy the two fields with certain delimiter e.g. ",". For instance,
firstName: Tom
firstName: Cruise
fullName: Tom, Cruise
Is there any option in copy-to to append delimiter with field.
Thanks for the quick response. I have test the suggested solution for my scenario. Let me explain the scenario a bit. I have a customer index with mapping as follows:
after ingesting some data using the POST endpoint, when I query for search all records, still there is a null value for the fullName field in the response. Is there something wrong with my approach.
Could you provide a full recreation script as I did and as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
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.