Answers for "elasticsearch aggregation unique values"

0

elasticsearch aggregation unique values

GET /_search
{
  "size": 0, // don't return any documents, just the aggregation
  "aggs" : {
    "distinctValues" : { // this can be any label you want
      "terms" : {
        "field" : "path.to.field", // field to be aggregated
        "size" : 500 // how many unique values to return
      }
    }
  }
}
Posted by: Guest on February-11-2021

Code answers related to "elasticsearch aggregation unique values"

Code answers related to "Javascript"

Browse Popular Code Answers by Language