ElasticSearch Filter by Aggregation Result -


i wanted double check if did not miss anything. in elasticsearch 1.4 not possible run type of server side filtering on aggregation results, correct? have example average percentage aggregation (0 .. ) , want remove above 0.9 in results.

with es 2.0 reducer seems possible or right @ client side, both requiring high term count (in end of them) figure out.

is there way missed es 1.4 achieve this?

here example:

{   "aggs": {     "group": {       "terms": {         "field": "contextraw.site_city",         "order": {           "result": "desc"         }       },       "aggs": {         "result": {           "avg": {             "field": "somepercentage"           }         }       }     }   } } 

with result small buckets on top percentage of 1.0, while not interested in those, in ones below 0.9.

   "aggregations": {       "group": {          "doc_count_error_upper_bound": -1,          "sum_other_doc_count": 5924518,          "buckets": [             {                "key": "value a",                "doc_count": 3921,                "result": {                   "value": 1                }             },             {                "key": "value b",                "doc_count": 312,                "result": {                   "value": 1                }             }, 

i wasn't sure best place ask, got answered in official forums.

in 1.4 there nothing filter buckets returned aggregations on client side. coming in 2.0 new pipeline aggregations there bucket_selector aggregation allow kind of filtering though

.


Comments