Quantcast
Viewing latest article 4
Browse Latest Browse All 9

Answer by MajidJafari for ElasticSearch - Return Unique Values

if you want to get the first document for each language field unique value, you can do this:

{"query": {"match_all": {    }  },"collapse": {"field": "language.keyword","inner_hits": {"name": "latest","size": 1    }  }}

Viewing latest article 4
Browse Latest Browse All 9

Trending Articles