Module
PercentilesAggregation
        PercentilesAggregation ( name )
    
    Aggregation that calculates one or more percentiles over numeric values extracted from the aggregated documents. 
  | 
Method Summary
| Returns | Name | Description | 
|---|---|---|
String | _type() | The type of ejs object. For internal use only. | 
Object | compression(c) | Compression controls memory usage and approximation error. The compression value limits the maximum number of nodes to 100 * compression. By increasing the compression value, you can increase the accuracy of your percentiles at the cost of more memory. Larger compression values also make the algorithm slower since the underlying tree data structure grows in size, resulting in more expensive operations. The default compression value is 100. | 
Object | field(field) | Sets the field to operate on.  | 
    
Object | keyed(trueFalse) | Enable the response to be returned as a keyed object where the key is the bucket interval. | 
Object | lang(language) | The script language being used. | 
Object | params(p) | Sets parameters that will be applied to the script. Overwrites any existing params. | 
Object | percent(percentile) | Add a single percentile to the current list of percentiles. | 
Object | percents(percents) | Sets the percentile bucket array. Overwrites all existing values. | 
Object | script(scriptCode) | Allows you generate or modify the terms/values using a script. | 
Object | scriptFile(scriptFile) | Allows you generate or modify the terms/values using a script. | 
Object | scriptId(scriptId) | Allows you generate or modify the terms/values using a script. | 
String | toJSON() | Retrieves the internal   | 
    
Method Detail
compression
        Object compression ( c )
    
    Compression controls memory usage and approximation error. The compression
      value limits the maximum number of nodes to 100 * compression.  By
      increasing the compression value, you can increase the accuracy of your
      percentiles at the cost of more memory. Larger compression values also make
      the algorithm slower since the underlying tree data structure grows in
      size, resulting in more expensive operations. The default compression
      value is 100. 
  | 
field
        Object field ( field )
    
    Sets the field to operate on. 
  | 
keyed
        Object keyed ( trueFalse )
    
    Enable the response to be returned as a keyed object where the key is the
      bucket interval. 
  | 
lang
        Object lang ( language )
    
    The script language being used. 
  | 
params
        Object params ( p )
    
    Sets parameters that will be applied to the script.  Overwrites
      any existing params. 
  | 
percent
        Object percent ( percentile )
    
    Add a single percentile to the current list of percentiles. 
  | 
percents
        Object percents ( percents )
    
    Sets the percentile bucket array.  Overwrites all existing values. 
  | 
script
        Object script ( scriptCode )
    
    Allows you generate or modify the terms/values using a script. 
  | 
scriptFile
        Object scriptFile ( scriptFile )
    
    Allows you generate or modify the terms/values using a script. 
  | 
scriptId
        Object scriptId ( scriptId )
    
    Allows you generate or modify the terms/values using a script. 
  | 
toJSON
        String toJSON ( )
    
    Retrieves the internal  
  |