Docs for finalizingFieldAccess post-aggregator. (#4737)

This commit is contained in:
Gian Merlino 2017-08-31 11:45:49 -07:00 committed by Fangjin Yang
parent d6179126ed
commit 9078925cab
1 changed files with 12 additions and 2 deletions

View File

@ -36,16 +36,26 @@ postAggregation : {
} }
``` ```
### Field accessor post-aggregator ### Field accessor post-aggregators
This returns the value produced by the specified [aggregator](../querying/aggregations.html). These post-aggregators return the value produced by the specified [aggregator](../querying/aggregations.html).
`fieldName` refers to the output name of the aggregator given in the [aggregations](../querying/aggregations.html) portion of the query. `fieldName` refers to the output name of the aggregator given in the [aggregations](../querying/aggregations.html) portion of the query.
For complex aggregators, like "cardinality" and "hyperUnique", the `type` of the post-aggregator determines what
the post-aggregator will return. Use type "fieldAccess" to return the raw aggregation object, or use type
"finalizingFieldAccess" to return a finalized value, such as an estimated cardinality.
```json ```json
{ "type" : "fieldAccess", "name": <output_name>, "fieldName" : <aggregator_name> } { "type" : "fieldAccess", "name": <output_name>, "fieldName" : <aggregator_name> }
``` ```
or
```json
{ "type" : "finalizingFieldAccess", "name": <output_name>, "fieldName" : <aggregator_name> }
```
### Constant post-aggregator ### Constant post-aggregator
The constant post-aggregator always returns the specified value. The constant post-aggregator always returns the specified value.