[10:20] unable to parse BaseAggregationBuilder with name [query]: parser not found

Hi everyone,

I'm facing a strange issue when performing a search on an nested field on multiple fields with aggregation.
{
"size": 0,
"aggs": {
"Attributes": {
"nested": {
"path": "Attributes"
},
"aggs": {
"Attributes-filtered": {
"query": {
"bool": {
"must": {
"multi_match": {
"query": "sofa",
"type": "best_fields",
"fields": [ "Name", "FullDescription", "ShortDescription", "Categories.Name" ]
}
},
"filter": { "bool": {} }
}
},
"aggs": {
"Attr_group": {
"terms": {
"field": "Attributes.Name.keyword"
},
"aggs": {
"Opctions": {
"terms": {
"field": "Attributes.AttributeOptions.Name.keyword",
"size": 100
}
}
}
}
}
}
}
}
}
}
Thanks in advance for any help,

Sincerely,
Sagar

When i used below code:
{ "size": 0, "aggs": { "Attributes": { "nested": { "path": "Attributes" }, "aggs": { "Attributes-filtered": { "filter": { "bool": { "must": [{ "multi_match": { "query": "sofa", "type": "best_fields", "fields": [ "Name", "FullDescription", "ShortDescription", "Categories.Name" ] } }], "filter": { "bool": {} } } }, "aggs": { "Attr_group": { "terms": { "field": "Attributes.Name.keyword" }, "aggs": { "Opctions": { "terms": { "field": "Attributes.AttributeOptions.Name.keyword", "size": 100 } } } } } } } } } }
After run this aggregation filtered query i get empty aggregation, and i filter may be not applied.
{ "took" : 4, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : 4194, "max_score" : 0.0, "hits" : [ ] }, "aggregations" : { "Attributes" : { "meta" : { }, "doc_count" : 40235, "Attributes-filtered" : { "meta" : { }, "doc_count" : 0, "Attr_group" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ ] } } } } }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.