-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Visualizations are always sorted alphabetically #14687
Comments
5.6.3 is the same as 6.0 (matches on any word in the filter). This is definitely a regression from 5.2.0 as seen here. In this case, only visualization titles which contain all the words are shown; I'll try to find where this actually changed. 5.3.3 and 5.4.3 and 5.5.1 behave like 5.2.0 (good) so the change was between 5.5 and 5.6. |
hmmm, when was the saved object api introduced? That might be the culprit. One way to fix this is to introduce "no sort" which I think is a good idea regardless of how we should be matching results. @cjcenizal what do you think of this? I think in order for it to be clear, we should always show the sort direction when a sort is applied to a header, not just on hover (not shown in the gif). Regardless we should probably figure out exactly what results we want returns, whether this new search was a "feature" or a bug (or just accidental). cc @tylersmalley - this ring any bells to you when implementing the saved object api search? |
Sorting on the score would probably help, but I think the real issue here is that we changed from matching ALL the filter words to matching ANY of the filter words. |
@stacey-gammon You're right, we should always show the sort arrow, not just on hover. This is how it's documented in the UI Framework, so we may have just lost that at some point during the implementation. When something isn't sorted, how is the order determined? |
I think it should be shown based off how the saved object api gives it to us. Looks like it's by score, and shows the most relevant matches first. |
yea, actually looks like the dashboard listing page shows the direction. I probably lost this functionality when I made the visualize listing table in react. |
+1 |
I don't know, I think I would expect partial matches, as long as the sorting made sense, and quotes worked accurately, in case I did want the search to be more specific. Kind of like Google search results. |
Hmm I can see the value in that. Maybe we can support Lee's use case by default, and surface some controls to support the use case you describe, @stacey-gammon ? For example we could have an options dropdown where you can check "Include partial matches". Or we could go a little nuts and support a search syntax that lets you OR strings together. |
I think the question we should answer first is what would most people expect and make that the default. in my opinion the more advanced search is with the quotes, the more basic search has more matches returned, but in a better order. What's wrong with showing a lot of matches, as long as the most relevant ones show up first in the list? |
I spoke with Chris about this over Zoom and I think we need to make the user feel like they're in control of the results they see. To me, this means leveraging established search UXes for both the simple and advanced use cases, so they're never surprised by their results. To me, a simple use case is like running a "Find" on a web page or in a text document (or even OS X spotlight search). Running "Find" only highlights exact matches and OS X spotlight only returns files named with the exact string (or containing metadata which contains the exact string). So in our case, I know there's a dashboard with a certain name and I'm trying to find it and only it, and searching for a string will only show me those dashboards which contain the string, so I can quickly focus in on the one I'm looking for. Showing results which fall outside of this paradigm would be surprising to me and I wouldn't feel like I was in control any more... the search is operating according to invisible rules which I don't understand. In a more advanced use case, I'd want more of the Google search UX you mentioned, where I'm not sure of exactly what I'm looking for. I'm really just exploring to see what's there.
I agree. I think most people come to Dashboards to either create a new Dashboard or to open one they know exists, so they can examine it and make a business decision, or share it with someone else, or delete it because it's outdated. I think the less common use case is someone coming in and being unfamiliar with the Dashboards which exist, and needing to browse around to see what people have created. Now that I think about it though, I'm probably biased because this is what I'm used to doing with issues and PRs. 😄 Usually I'm looking for a particular issue or PR I know exist, but sometimes I want to check to see if something relevant to a particular topic is already being discussed or worked on. |
It might be nice to have any titles which match ALL words first in the filtered results, followed by fuzzier matches after that. Remember that 5.5 and earlier only returned results matching all words in the filter. I haven't heard anybody say that the change in 5.6+ was intentional. So we should probably consider it a regression. |
I found another work-around. If I enter a I can't believe we haven't heard a ton of complaints on this. I just searched visualizations (in 5.6.7) for |
@LeeDr, it definitely bugged me but I figured out a work around (make sure your item has a specific word that you can search on) and told everyone else on my team and then ignored it. |
@trevan That makes sense. I'm glad you found a way to make it work. I'm always testing with around 200 pre-made beats visualizations (and saved searches and dashboards) all installed and this problem becomes very obvious in that case. I know some of our users have over 800 visualizations. Plus this change caused some automated tests to fail because the test doesn't go through pages to find the link. I fixed the tests by always wrapping the filter (which was the exact visualization title) in double quotes so it only finds that exact one. But that's not something I would expect users to have to do. |
I opened issue #18649 for the same reason. Personally, I think we are making this issue more complicated that it should be. I have 400+ visualizations and this new "feature" annoys me and all my users.
I totally agree with this. If someone wants to explore existing dashboards, they can type in one keyword and then scroll through the dashboard list. With |
Someone suggested that it might have been this change in Elasticsearch which caused this change in Kibana elastic/elasticsearch#25470 |
I just did some more research and have a new idea on the problem. The problem isn't the results that are returned, the problem is that they are being sorted alphabetically by Kibana. I just did a test where I enabled slow logs on .kibana and then took the query from me searching for a visualization into the dev tools. When I search for If possible, we should stop sorting the Elasticsearch results and show them in the order in the response. We already allow sorting by title in a normal way so it's just one more click if they really do want that. |
@LeeDr I think this is a great idea and should definitely be possible. We just need to update EuiTable to support the deselection of a sort column. Can you create an issue in the EUI repo and cross-link here? |
I haven't had a chance to read through the entire issue and this may have already been mentioned but we'll need to fix on the "Add visualization" and "Add saved search" views in the Dashboard navigation as well. I've experienced this first hand a few times now and it's very frustrating to search through visualizations when adding to a dashboard. Is there any way we can expedite a fix here? Is it possible we are overcomplicating this? |
@alexfrancoeur I don't know if the same EuiTable is used in those places. But it would be great if one fix in that table could resolve that issue in all places. I think we just need to stop sorting the results that Elasticsearch returns. |
Fixed via #32583 |
Update by Tim: The root cause in this issue is, that visualizations in the visualization listing page are always sorted alphabetically, even while searching. That is not good behavior and should be fixed. I want to separate that from #20676 which actually tracks the issue, that saved objects are searched by
OR
instead ofAND
nowadays.Kibana version: 6.0.0-rc2
Elasticsearch version: 6.0.0-rc2
Server OS version: CentOS
Browser version: Chrome
Browser OS version: Windows 10
Original install method (e.g. download page, yum, from source, etc.): rpm packages
Description of the problem including expected versus actual behavior:
I'm automating a test for APM and when I enter the exact title of the visualization in the filter bar, the test can't click on the link to open it because it's on the 3rd page of results. The results include all visualizations which include ANY of the words I entered in the filter.
Our query should be match all instead of match any?
Steps to reproduce:
Here's a screenshot of the Visualization which matches the exact filter I entered showing up on the 3rd page of results:
The text was updated successfully, but these errors were encountered: