-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Cannot use missing in terms aggregation for non string fields #17454
Comments
My suggestion would be to leave it up to the user to choose the desired key, as this will depend on the data he is looking at. A warning that this can lead to incorrect results if the key appears in the data should also be added. |
The problem is, that we set the "missing label" and the user can specify that freely already, but we would need a way to specify the real bucket key we want to use. I am not sure if the user should be able to specify that, because that is something rather technical that need to understand some ES knowledge. But auto generating it, will also be hard, like what valid IP would we generate for the missing IP bucket. Maybe we should just enforce, that the label the user specifies would be a valid value for that type, and then use the value also as the key. I would like to wait for @ppisljar for some discussion around that topic, since he built that feature initially and is way more in-code than I am. |
As a workaround, the "JSON Input" under "Advanced" can be used for now. Example for a boolean field: {
"missing": "true"
} |
you can re-cast data types using runtime fields to work around this issue. |
don't believe there is plans to address this within Elasticsearch at this time. closing this issue with the above workaround |
We currently have the "missing" and "group other" option enabled in terms aggregation for any field. Unfortunately when selecting a non string field, it will throw the following error, since we cannot use
__missing__
as a bucket key for non string fields.Numeric field
IP field
Date field
I think we could try to use other keys for non string fields, that matches the key type. Until we figured out if we can work around those, we should disable the settings for non string fields.
The text was updated successfully, but these errors were encountered: