I am creating a solution based on elastic search based on user inputs for a text.
The results are to be shown in 3 groups - one group containing the exact match, second group containing only the stemmed results and the third group containing only the results obtained from synonyms of the input text phrase.
To do this, I have setup two copies of the text field, one which is analysed (used for synonyms and stemming) and the other which is not analysed (used for exact match).
The problem is, in the results obtained for stemming and synonyms, I am getting those same results that of exact match.
Ideally, I would like these groups to be mutually exclusive - the results should not overlap in those 3 result sets.
I tried using boolean queries using must_not but it seems to perform the boolean operation on the query criteria and not on the results.
Is there any way to achieve this?
Your help in this regard would be very helpful.
Thanks in advance.