-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
[Transform] add support for filter aggregation #52151
Comments
Pinging @elastic/ml-core (:ml/Transform) |
We discussed this issue and agreed on flatten the result:
In case of sub-aggregations the result will be nested for the leaf aggregation. The field I case you want Example:
results in:
|
add support for filter aggregations, refactor code for sub-aggregation support in mapping deduction fixes #52151
add support for filter aggregations, refactor code for sub-aggregation support in mapping deduction fixes #52151
Filter aggregation cover some nice usecases.
For example to gather stats for response codes:
Note that
filter
supports sub aggregations which makes it hard to decide on the right structure in the transform destination index. For the simple example above the output structure could be:For this the
doc_count
of the ouput is used as flat result.If you specify a sub-aggregation, we can not provide a flat result, because we need a nested object. For this case we could fallback to:
If a sub aggregation is used, the user probably does not care about the
doc_count
field, but we do not know. For getting rid of id, you can use a pipeline.Discuss
filter
specifies no sub aggregation?The text was updated successfully, but these errors were encountered: