I am writing a single value custom aggregation in Elastic Search and for this I need to use analyzed text. The problem that I am facing is that the aggregated text occurs in alphabetical order - for every chunk of text.
Shard1- Doc1 - "Hello how are you"
Shard2- Doc1 - "I am good"
[are, hello, how, you, am, good, i]
I would like to preserve the original order of the words in the text for the aggregation.
Expected Aggregated text:
[hello, how, are, you, i, am, good]
Is there any one here who has faced a similar problem and are there any work arounds for this? Can the ordering of the analyzed text be prevented some how?
Any help would be appreciated!