Module
CardinalityAggregation
CardinalityAggregation ( name )
Aggregation that calculates an approximate count of distinct values.
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | field(field) | Sets the field to operate on. |
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 | precisionThreshold(num) | Allows to trade memory for accuracy, and defines a unique count below which counts are expected to be close to accurate. Above this value, counts might become a bit more fuzzy. The maximum supported value is 40000, thresholds above this number will have the same effect as a threshold of 40000. Default value depends on the number of parent aggregations that multiple create buckets (such as terms or histograms). |
Object | rehash(trueFalse) | Set to false to disable rehashing of values. You must have computed a hash on the client-side and stored it into your documents if you disable this. |
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
field
Object field ( field )
Sets the field to operate on.
|
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.
|
precisionThreshold
Object precisionThreshold ( num )
Allows to trade memory for accuracy, and defines a unique count below which
counts are expected to be close to accurate. Above this value, counts might
become a bit more fuzzy. The maximum supported value is 40000, thresholds
above this number will have the same effect as a threshold of 40000.
Default value depends on the number of parent aggregations that multiple
create buckets (such as terms or histograms).
|
rehash
Object rehash ( trueFalse )
Set to false to disable rehashing of values. You must have computed a hash
on the client-side and stored it into your documents if you disable this.
|
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
|