-
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
Return an aggregated view of all mappings/properties of all types #15728
Comments
Note that we are also considering removing types or at least divorcing mappings from types. See #15613. |
@jpountz I think this is a good idea but in the mean time are you in favor of this proposal ? Will you support a pull request with this feature ? |
HI @Mogztter What exactly is your use case for this? @rashidkpc is asking for something similar in Kibana, but slightly different. They would like an API which accepts zero or more indices and zero or more types and returns an array of distinct fields (an array, because some fields with the same name will be different in different indices) listing:
Would an API like this cover your requirements too? |
I don't really have a use case, my goal is to improve performance of Kibana and Head by returning just the right level of information.
I think so, as long as the result is an array of distinct fields. |
This feature is even more important for Kibana with the change from string -> text in ES 5.0. Since |
@clintongormley This is really important for us, really need this sooner than later. |
Couldn't agree more with @Bargs. With the change to string fields, and the fact that text is not aggregatable by default, this has become extremely important for Kibana |
I thought it used to be the same before since the logstash template would disable fielddata on string fields? (to encourage to use the |
Only a subset of Kibana users use logstash, and logstash didn't make that change until Nov 2015 |
Is it something that could be done with the field mappings API? For instance, the sense recreation below:
returns
Fields that are searchable are those that have |
It could be, but we'd much rather have a property that told us if the field was aggregatable. It used to be that any field with |
@clintongormley in response to your point on #12817:
HTTP compression would likely be a wash at best. The issue is the size of the object being deserialized, not the actual bytes going over the wire. The browser's JSON deserializer tends to have issue deserializing single objects over a couple megs, which isn't uncommon for users with many fields in many indices. |
This is something that we could fix by using the same index/doc_values/fielddata convention as other fields. For instance I think it would be fine if the |
The big problem here is simply tracking the rules and knowing when they change. Since elasticsearch already knows the rules for when things are aggregatable, it would be best if there was an API to convey a fields abstract capabilities instead of the client needing to discern them from its enabled features. |
Closing in favour of #17750 |
Currently we can retrieve all mappings and properties of all types with
_cluster/state
but the response size is proportional to the number of indices.Most of the time (and I think this is mandatory in Elastcicsearch 2.x) field mappings are consistent between types, so we should be able to create an aggregated view that way the response size will be proportional to the number of properties and types (but not to the number of indices).
.API proposal to retrieve an aggregated view of all mappings
Following the same principle, here is the query to create an aggregated view of all properties:
.API proposal to retrieve an aggregated view of all properties
If it's necessary we could also report fields/properties conflicts between types (or even indices):
.Conflict on
application
property between two typesI think this will greatly improve the performance of administration/data visualization tool like Kibana or Head plugin when the cluster have many indices (> 100).
What do you think ?
The text was updated successfully, but these errors were encountered: