Browse Source

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
caldwecr 10 years ago
parent
commit
1ac728d22b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      docs/reference/aggregations/bucket/filter-aggregation.asciidoc

+ 3 - 3
docs/reference/aggregations/bucket/filter-aggregation.asciidoc

@@ -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:
         }
     }
 }
---------------------------------------------------
+--------------------------------------------------