How to fetch the distinct records from Elastic Search


(sowjanya) #1

How to fetch the distinct records from Elastic Search.

Eg:
field1 field2 field3
1 abc xyz
2 abc def
3 abc pqr

Now,iam searhing for xyz OR def OR pqr. For these records field2 value is same.
now,Iam getting the 3 records(abc,abc,abc). But,I need only one record(abc).

How,can i query for getting the distinct Results.

Please help me.
Thanks in Advance.


(system) #2