How can we make aggregation query on document?

(Haresh Patel) #1

I am getting duplicate records while making query. I make a cardinality query but getting wrong document count.
Is this possible like SQL I get distinct records ?

(Adrien Grand) #2

Elasticsearch does not support requesting unique documents. In order to do that, you would need to handle the deduplication step at indexing time, for instance by using a fingerprint of your documents as an id.

(system) #3