-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
field stats api should return results for fields in the mapping, but without indexed documents #22438
Comments
Fixed by #21821 |
@clintongormley @jimczi I'm not sure #21821 fixes this. I just tried the following steps is a fresh build of ES master: Create an index with a field that should be searchable and aggregatable based on its mapping:
Am I doing something wrong or is there a misunderstanding? This issue is biting us in a few different ways right now: |
#21821 is about non-searchable fields so with |
Thanks for the clarification @jimczi, I was just confused by @clintongormley's comment above. |
I understand the need for Kibana to give hints to people using the UI. Like here is the list of fields that we think could work for this agg. Though it should be just an hint and user should still be able to set a custom field if they want. We also have issues with custom field mapper that could decide to not return any |
Good to know! We'll try to come up with a solution in Kibana |
I was confused too :) Thanks @jimczi for the clarification |
That's concerning....
What Kibana should/shouldn't do is carefully considered and we disagree with you here. We think it's a better user experience if Kibana and Elasticsearch work together to determine the exact list of options that the user has available. Not a list of things that might, probably, or could work. In order to determine this we have pushed for prs like #17750 so the authority on the matter, elasticsearch, can tell us what it knows. When it says a field is not searchable or aggregatable there is nothing that should be more trustworthy. |
this feature make not much sense to me on field stats. Field stats can't be returned if there are no documents which implies that there are no stats. I also don't understand why the fields stats API returns mapping information at all? Why isn't this a dedicated API? Field stats is really about the inverted index and that's about it? |
Maybe @clintongormley can remember where we discussed this, but we talked at length about making this into it's own API and compromised on this solution. |
I'm happy to revisit the APIs that we have. There's get-mapping, get-field-mapping, and field-stats. I'd like to get rid of get-field-mapping in its current form as it doesn't quite do the job. Perhaps we need to replace get-field-mapping with the mapping aspects of field-stats, and then make field-stats JUST about the stats? Also see #5368 |
Coming up with some sort of solution to this (though not necessarily what the title of the issue says) is very important for the user experience of the machine learning UI. The problem for ml is that when you create a new job we're in the situation of knowing there are going to be certain fields in the results eventually, but not having any results at the instant the job is created. We'd like to set up Kibana to be able to visualise our results as soon as they exist, but at present this is not possible because of the fact that Kibana is using the field stats API to populate its index pattern mappings and the field stats API doesn't return what Kibana needs for fields that don't exist in any indexed document. |
@jimczi is working on a new field-capabilities API which will rely only on mapping, not on stats (or which docs are indexed). It will return field type and |
Is this available in Kibana 5.3.0 ? |
@Hronom follow elastic/kibana#11014 |
Describe the feature:
Related to #17750
Since version 5.0, Kibana has had a dependency on the field stats api to determine which fields are aggregatable, and searchable. Because of this, the field stats API should return a subset of information that contains at least these propertied for fields in the mapping, but do not yet have documents indexed.
Example linked here:
https://gist.github.com/ycombinator/757cd9cd7303933abf3bc3b7e477c1fd#file-fieldstats-nodata-md
The text was updated successfully, but these errors were encountered: