-
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
[Lens] "Top Values" allows setting missing values switch for numeric fields #102640
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
Top values should work with number fields - it's not related to the missing bucket issues. |
Sounds similar to me as well. |
The fact missing can be set for number fields in Lens is a real bug though - I will keep the issue open to track fixing this part. |
@flash1293 my hope is that the fix for allowing setting "missing" values is accomplished by altering the behavior such that missing values can be shown for numeric fields (as shown above) instead of blocking the selection of "missing". I understand this becomes more of a feature request, but our users frequently complain about the inability to use "missing" in conjunction with numeric fields. |
@maihde There are some technical challenges in doing this - I think it's worth a separate issue. However, there should be an easy workaround - extend your mapping and index the number as a keyword as well:
On Note: You won't be able to format the numbers this way. The requirement for missing option on numeric fields (without mapping tricks) is absolutely justified. |
Kibana version: master @ b5f0bc9
Elasticsearch version: 8.0.0 snapshot
Original install method (e.g. download page, yum, from source, etc.): Source
Describe the bug:
Addition:
Part of this is fixed already - #102640 (comment) is the missing part
Legacy aggregation based visualizations didn't allow "Show missing values" to be selected with "Terms" aggregations against numeric fields. The bug is that Lens attempts to implement similar behavior by preventing "Top values" from being used at all by showing an error that says "To use this function, select a different field.". There are two bugs:
Describe the feature:
Support missing values in Lens and Terms-based aggregation visualizations on numeric fields.
Steps to reproduce:
test_data
with horizontal axistimestamp
and vertical axisCount
verify 3 records are shown.a_number_field
. Observe that two records are shown with values of 0 and 1 in legend.a_number_field
onto Break down by and then click ita_string_field.keyword
and repeat and selecta_number_field
. Observe that "Top values" configuration is now available.Expected behavior:
Step 7 - three records are shown
Step 10 - no error message is shown
Step 5 & 11 - behavior is inconsistent about showing error message, but once the error message is removed for numeric fields this will become a non-issue.
Any additional context:
My suspicion is because doing this type of aggregation:
Fails with
But an alternative is that when the "Show missing values is enabled" to simply add a 'filter' aggregation:
With this implementation, missing values can be used for both string and numeric Terms/Top values aggregations.
The text was updated successfully, but these errors were encountered: