-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Dashboard/Visualization search needs to be able to keep best match criteria #19656
Comments
It turns out I was mistaken on my assessment of how 5.3 returned results. The real problem is that 5.3 did an 'AND' for the simple query string default_operator parameter and 5.6 uses the Elasticsearch default of 'OR'. |
This looks to be resolved. Please reopen if needed. |
@bmcconaghy In case anyone wants to know this was not resolved and I am not allowed to reopen. 6.5 still uses Elasticsearch's default value of OR for the default_operator field and does not set it to AND like it did in previous versions of Kibana when searching for dashboards or visualizations. I'll explain why this is a problem. Take names like:
5.3 and previous versions would return the following for the search: one two three
Everything after 5.3 would return the following for the search: one two three
So even though you wanted to search for the specific dashboard name you are returned with every dashboard/visualization that has the name one OR two Or three. With thousands of visualizations and hundreds of dashboards this kind of searching is not helpful. Depending on what our users would type in they might not even see their dashboard they were trying to look for on the first page. A configurable setting or even a toggleable radio that switches between the two default operators to use for spaces on the fly would be appreciated so we can get back to previous behavior when searching for saved objects. For reference: Everything after 5.3 including master does not set default_operator to AND when searching for saved objects. |
Have you tried the query |
I didn't know that operator would work. Yes that would force the AND operation but was this an intentional change to the saved objects searching from previous versions? If so, I'm curious as to what drove this decision. I think the previous behavior makes more sense as you are 9 times out of 10 trying to find the one occurrence of a saved object. Which I think makes AND the more suitable default operator when searching like it has been for long time. The current default searching (for a basic search) of saved objects is now search any occurrence of the terms provided with relevance thrown out the window because results are shown alphabetically. I believe this makes the searching cumbersome. |
@stacey-gammon I am trying to track down why saved object loader switched from setting It looks like Use saved object client for saved_object_loader find function modified the saved object loader from directly calling elasticsearch to calling |
It was awhile ago, but I don't believe the change was intentional to not use cc @tylersmalley - does the saved object client support switching to an |
@stacey-gammon it does not currently support changing the operator (implemented here: https://github.com/elastic/kibana/blob/master/src/server/saved_objects/service/lib/search_dsl/query_params.js#L117) I don't think changing this behavior was intentional. |
I'll close that as a duplicate, since it seems to be covered by two other issues: The fact that the saved object API nowadays searches by |
In previous Kibana versions (5.3) the search for these two pages would basically give you a best match on Elasticsearch's scoring criteria for the search term. We upgraded to 5.6 and now the results are always being sorted without a way to turn the sorting off.
Describe a specific use case:
Say for instance a Dashboard was named "Test - Zones". The "Test - A", "Test - B", "Test - C", etc. dashboard names would show up first because of the automatic sorting being applied making the search unusable when you have hundreds of similar named visualizations/dashboards.
I got around this by modifying our current version to show the best match Elasticsearch provided on the search term.
The text was updated successfully, but these errors were encountered: