-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
In elastic/elasticsearch#56195 we added the ability to filter the field capabilities output with an index filter.
The idea is that _field_caps can dynamically retrieve a list of fields that are relevant for the context.
If a user in Discover has a range filtering the last 3 days, we should restrict the list of available fields for suggestions to the ones that appear in the range.
Our Observability solution also uses constant_keyword to differentiate data streams so applying the current filters to the _field_caps call could limit the fields to a specific metricset like cpu for instance.
This change is important for our Solutions in order to have a way to limit the number of fields in large index patterns when the context is narrowed (by a range filter or a filter on the dataset).
Today the list of fields of an Index Pattern is retrieved once on each app through field_caps without taking the context into account.
We should make it even more dynamic and apply the context of the apps more eagerly when possible (changing the range filter should update the list of available fields).