-
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
Fail to create aggregate on a field with a mixed numeric data type #12285
Comments
What does field_stats and/or field_caps say about the field? searchable/aggregatable come straight from ES, so it may be a false negative coming from ES. |
Look at the discuss ticket linked, it had field_caps response. Send back true twice looks like, for each type, so maybe we aren't interpreting that response correctly |
Ah I see, it does look that way. @spalger do you know why that might be the case? |
Errr... I don't know what I was thinking yesterday. The switch to field_caps didn't happen until 5.5. So if this is happening in 5.4, it's because field_stats is responding with a conflict (as shown in the discuss ticket) |
Ok, so I tested both 5.4.1 and 5.5.0 to be sure. In 5.4.1 |
I'm fairly certain this was fixed earlier. Can you confirm? |
I haven't tested the fix, but this is definitely the same issue that was being addressed in that PR. |
K. I'm going to close this for now. Please reopen if it wasn't addressed |
To Repro:
Create an index with an int data type:
Create another index with a float data type:
In kibana, create the index pattern that picks up a single one:
test-int
as well as one that picks up both:test-*
.You can see that the field
duration
intest-int
is marked asaggregatable
andsearchable
but the same field duration intest-*
is not marked as such.The issue is that the field comes back as two different types depending on the index:
GET /test-*/_field_caps?fields=duration
yeilds:This is not actually a problem for elasticsearch, as you can see it has no problem with the aggregation:
but for some reason, Kibana can't handle it and won't allow you to create a visualization using that field.
Background: https://discuss.elastic.co/t/variation-of-the-field-is-a-required-parameter-error/89081
I suspect this is the cause for some of the more frequent encounters in 5.4 we are seeing of the "field is a required parameter" error mentioned in #9571
The text was updated successfully, but these errors were encountered: