Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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
      }
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: Disable button if one of the checkboxes are not checked 
Javascript :: timestamp convert moment vue 
Javascript :: javascript select text in element 
Javascript :: JavaScript String startsWith() examples 
Javascript :: buffer in javascript 
Javascript :: forin js 
Javascript :: js merge objects 
Javascript :: how to check if value is undefines if condition jquery 
Javascript :: add two strings javascript 
Javascript :: axios send post to php 
Javascript :: window.scrollto(0 0) not working 
Javascript :: This version of CLI is only compatible with Angular versions 
Javascript :: resize function in addEventListener JS 
Javascript :: kendo template multiselect default selected 
Javascript :: bindparam 
Javascript :: nodejs dotenv path how to set 
Javascript :: reload data in datatable 
Javascript :: fromcharcode in javascript 
Javascript :: javascript copy 2d array 
Javascript :: javascript if value is a string function 
Javascript :: json.stringify vs json.parse 
Javascript :: jquery 1 cdn 
Javascript :: how to use uniqid 
Javascript :: how to know which button is clicked in jquery 
Javascript :: select in react with nchange 
Javascript :: dm command discord.js 
Javascript :: javascript file exists check 
Javascript :: phaser change background color 
Javascript :: jquery check if all checkbox is not checked 
Javascript :: Sorting an array of objects by property values 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =