Quantcast
Channel: ElasticSearch - Return Unique Values - Stack Overflow
Browsing latest articles
Browse All 8 View Live

Answer by Abolfazl Ayoubi for ElasticSearch - Return Unique Values

aggs will work on number value by default if you want work on string filed you should enable it on fie

View Article



Answer by AutoVit for ElasticSearch - Return Unique Values

To had to distinct by two fields (derivative_id & vehicle_type) and to sort by cheapest car. Had to nest aggs.GET /cars/_search{"size": 0,"aggs": {"distinct_by_derivative_id": {"terms": { "field":...

View Article

Answer by Ilarion Halushka for ElasticSearch - Return Unique Values

If you want to get all unique values without any approximation or setting a magic number (size: 500), then use COMPOSITE AGGREGATION (ES 6.5+).From official documentation:"If you want to retrieve all...

View Article

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":...

View Article

Answer by MAULIK MODI for ElasticSearch - Return Unique Values

I am looking for this kind of solution for my self as well. I found reference in terms aggregation.So, according to that following is the proper solution.{"aggs" : {"langs" : {"terms" : { "field" :...

View Article


Image may be NSFW.
Clik here to view.

Answer by bradvido for ElasticSearch - Return Unique Values

Elasticsearch 1.1+ has the Cardinality Aggregation which will give you a unique count of the terms, but not the terms themselves.Note that it is actually an approximation and accuracy may diminish with...

View Article

Answer by Anton for ElasticSearch - Return Unique Values

You can use the terms aggregation.{"size": 0,"aggs" : {"langs" : {"terms" : { "field" : "language", "size" : 500 } }}}The size parameter within the aggregation specifies the maximum number of terms to...

View Article

ElasticSearch - Return Unique Values

How would I get the values of all the languages from the records and make them unique.RecordsPUT items/1{ "language" : 10 }PUT items/2{ "language" : 11 }PUT items/3{ "language" : 10 }QueryGET...

View Article

Browsing latest articles
Browse All 8 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>