elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.23k forks source link

[Unified Search][Data Views] Allow to search by index pattern too #135235

Open jughosta opened 2 years ago

jughosta commented 2 years ago

Kibana version: main

Description of the problem including expected versus actual behavior: Current DataViewPicker allows to filter data views by their name (custom name if provided or index pattern as a fallback). Users might want to be able to search by index pattern field of data views too even if that data view has a custom name.

Steps to reproduce:

  1. Create a data view with a custom name which is different from its index pattern
  2. Try to find that data view by entering index pattern in the search field of DataViewsList

Jun-27-2022 17-26-50

jughosta commented 2 years ago

Linking to https://github.com/elastic/kibana/issues/59432

jughosta commented 2 years ago

cc @stratoula

elasticmachine commented 2 years ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

kertal commented 2 years ago

One more thing we might consider: Allowing also to search by id. While for the generated one this makes no sense, but we also allow to provide custom ids

elasticmachine commented 2 years ago

Pinging @elastic/kibana-app-services (Team:AppServicesUx)

kertal commented 2 years ago

Another reason why we need to do this. When we allow ad-hoc data views, once the user enters a text into the search box, we need to be sure that all possible matches of data view for the given pattern are displayed.

in the current state, when the user would enter indexName and indexName would have a custom name Index Name, nothing would be found and given we search the name of indices that would match, we would suggest to use the entered name for an ad-hoc data view.

stratoula commented 2 years ago

This is easily done with EuiSelectable, we just need to pass a secondary field to search.

Check https://elastic.github.io/eui/#/forms/selectable --> Custom content

mattkime commented 2 years ago

I'd prefer to hear this request from our users. I think this might be a desire to use new functionality in an older way of working. If our users need to identify data views by their underlying index pattern then they can just use the index pattern as the name. I guess I'm skeptical of the need to reference data views in that drop down by BOTH the verbose name and the index pattern.

stratoula commented 2 years ago

I see your point here @mattkime and I don't have a strong opinion. I am jus thinking a scenario like:

It could be useful I think! I am fine on waiting the users' feedback too! cc @ghudgins

kertal commented 2 years ago

In case it's still the plan to allow the user to quickly create a ad-hoc data view, if no matching entry can be found, how would this work without allowing the search for the index pattern?

Just wondering how it works without the ability to search by index pattern too ... btw a while ago I saw an old issue requesting a user to search for an id ... because back in the days we had ids like test-*, I'm quite sure the search by index pattern will be requested.

elasticmachine commented 3 weeks ago

Pinging @elastic/kibana-visualizations (Team:Visualizations)

kertal commented 3 weeks ago

wanted to icebox this, but we don't own this area of the code, reassigning. It could be a good issue for somebody starting ... or something to icebox