-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter aggregation is missing sub aggregations in result #87
Comments
swallez
added
Area: Specification
Related to the API spec used to generate client code
v7.16.2
labels
Jan 10, 2022
This is an issue in the API specification that will be fixed in elastic/elasticsearch-specification#1243. The java client will be updated once this spec fix is merged. |
swallez
added
specification:fixed
and removed
Area: Specification
Related to the API spec used to generate client code
labels
Jan 12, 2022
swallez
added a commit
to swallez/elasticsearch-java
that referenced
this issue
Jan 24, 2022
swallez
added a commit
that referenced
this issue
Jan 24, 2022
swallez
added a commit
to swallez/elasticsearch-java
that referenced
this issue
Jan 24, 2022
swallez
added a commit
to swallez/elasticsearch-java
that referenced
this issue
Jan 24, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems the client is not parsing/returning sub aggregations that appear under filter aggregation. Here is a sample query and response.
Request:
{ "_source": { "excludes": [ "attachmentContents.*" ], "includes": [ "*" ] }, "aggregations": { "count": { "value_count": { "field": "messageStorageId.messageId" } }, "login_filter": { "aggregations": { "date": { "terms": { "field": "year", "order": [ { "_key": "desc" } ] } }, "to_domain": { "terms": { "exclude": [ "unknown" ], "field": "to.domain" } }, "file_ext": { "terms": { "exclude": [ "" ], "field": "attachments.fileExt" } }, "has_att": { "terms": { "field": "hasAttachments" } }, "from": { "terms": { "exclude": [ "unknown" ], "field": "sender.name" } }, "from_domain": { "terms": { "exclude": [ "unknown" ], "field": "sender.domain" } }, "to": { "terms": { "exclude": [ "unknown" ], "field": "to.name" } } }, "filter": { "bool": { "must": [ { "bool": { "minimum_should_match": "1" } } ] } } } }, "from": 0, "highlight": { "fields": { "body": { "fragment_size": 0, "number_of_fragments": 0 }, "attachments.fileName": { "fragment_size": 0, "number_of_fragments": 0 }, "attachmentContents.*": { "fragment_size": 200, "number_of_fragments": 2 }, "subject": { "fragment_size": 0, "number_of_fragments": 0 } }, "post_tags": [ "</span>" ], "pre_tags": [ "<span class=\"blue-hilite\">" ] }, "query": { "bool": { "must": [ { "bool": { "must": [ { "query_string": { "default_operator": "and", "query": "Tsang" } } ] } }, { "bool": { "minimum_should_match": "1", "should": [ { "match_all": {} } ] } } ] } }, "size": 10, "sort": [ { "messageDate": { "order": "asc" } } ], "stored_fields": [ "_source" ] }
Response:
{ "took": 190, "timed_out": false, "_shards": { "total": 1, "successful": 1, "skipped": 0, "failed": 0 }, "hits": { "total": { "value": 1, "relation": "eq" }, "max_score": null, "hits": [] }, "aggregations": { "count": { "value": 1 }, "login_filter": { "meta": { }, "doc_count": 1, "to_domain": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "cnn.com", "doc_count": 1 } ] }, "date": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "2008", "doc_count": 1 } ] }, "has_att": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": 1, "key_as_string": "true", "doc_count": 1 } ] }, "file_ext": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "doc", "doc_count": 1 } ] }, "from_domain": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "gmail.com", "doc_count": 1 } ] }, "from": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "John Tsang", "doc_count": 1 } ] }, "to": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "John Smith", "doc_count": 1 } ] } } } }
Specifically, sub aggregations above under "login_filter" section are not visible in the java client:
The text was updated successfully, but these errors were encountered: