-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
In support of Data streams - elastic/elasticsearch#53100
tldr; We need a way to select data streams, index aliases, and indices in such a way that we show the user which entities their wildcard matches.
tl;
Initial display of indices -
Display of matched indices -
Currently we only display indices with at least one document. You can match an index alias but we don't indicate you match it, we just show the indices it references. Finding a document is important as we store a list of fields with the index pattern saved object. We could display an error if a wildcard matches an index without documents.
We may want to add metadata to the entities returned but currently have no defined needs. Let's make sure its easy to add in the future.
This needs to be cross cluster aware. Currently we make two requests when listing indices in the index pattern creation ui - * and *:*. We do this because the cross cluster request is more likely to be slow or fail so its nice to independently error on the cross cluster request.
API proposal:
Request - GET _data_source/{wildcard}
Result -
{
indices: [{ name: 'index_name'}],
data_streams: [{name: 'data_stream_name'}],
index_aliases: [{name: 'index_alias_name'}],
}
I'm unsure if this should be implemented in elasticsearch or kibana. You could duplicate the result with GET * (for indices), GET /_alias and GET /_data_streams/ although the individual APIs might be doing more work than necessary. Speed should be taken into consideration as it affects flexibility of usage. We would prefer that index patterns are quick and easy to create as to facilitate data exploration, unlike now where its treated as a kibana configuration step. Its notable that GET * frequently returns large payloads detailing fields and their capabilities.

