Docs: Update filter-aggregation.asciidoc
Replace the previous example which leveraged a range filter, which causes unnecessary confusion about when to use a range filter to create a single bucket or a range aggregation with exactly one member in ranges. Closes #11704
This commit is contained in:
parent
ef8ee12259
commit
1ac728d22b
|
@ -9,8 +9,8 @@ Example:
|
|||
--------------------------------------------------
|
||||
{
|
||||
"aggs" : {
|
||||
"in_stock_products" : {
|
||||
"filter" : { "range" : { "stock" : { "gt" : 0 } } },
|
||||
"red_products" : {
|
||||
"filter" : { "term": { "color": "red" } },
|
||||
"aggs" : {
|
||||
"avg_price" : { "avg" : { "field" : "price" } }
|
||||
}
|
||||
|
@ -35,4 +35,4 @@ Response:
|
|||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
--------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue