Elastic search
I want to know how one can get excellent field value in elastic search. I am reading an article here that shows how to do this with facets, but I am reading the graphs are deprecated:
http://elasticsearch-users.115913.n3.nabble.com/Getting-Distinct-Values-td3830953.html
Is there any other way to do this ? if not, can you tell me how to do it? it is difficult to understand solutions like this: Elastic Search - display all different array values
Use aggregations:
GET /my_index/my_type/_search?search_type=count
{
"aggs": {
"my_fields": {
"terms": {
"field": "name",
"size": 1000
}
}
}
}
You can use the label Cardinality
Even though the counters returned do not guarantee 100% accuracy, they almost always refer to low power terms and the accuracy is configured using a parameter precision_threshold
.
http://www.elastic.co/guide/en/elasticsearch/guide/current/cardinality.html