Are you using any special mappings for these indexes? Which version of Elasticsearch are you running?
My suspicion is that your TDID field is mapped as a text datatype. A text field's contents will be split into tokens for searching. The mapping you want for an identifier like this is probably a keyword datatype, which stores exact values like email addresses or phone numbers efficiently for searching.
You might have a keyword field as a default mapping. If so, you could use the following aggregation:
@William_Brafford Thanks for your response. Above works, as I could see the duplicates. A Clarification, if possible. I need to create a new document based on grouping(Merging) by the TDID with specific fields to combine and create a document to be inserted as index.
In Simple: All the documents should be based on individual TDID, where its eventname like impression, clicks are combined as list in the same document.
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.