-
Notifications
You must be signed in to change notification settings - Fork 4.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
Improve relevance and ordering of search results in Link UI and Navigation block #38121
Comments
Thanks for bringing this to attention. There have been some relevant discussions before. You mentioned the bulk linking interface which is one. I remembered @jasmussen also had some proposals in this issue - #34041 (comment). |
I agree with everything discussed here. I've renamed to make it a little clearer as to the purpose of the Issue and also added to the Nav block tracking issue. |
Seems like the order of the results mentioned in the original issue is queried from the search rest API. Perhaps we can add |
Let me check this. @kevin940726 I don't see an order parameter available on that endpoint. |
@getdave Oh, I mean we should add the missing functionality of the |
Logging this feedback (and ideas) related to this functionality as a part of the FSE Outreach Program's recent exploration, Site Editor Sneak Peek:
|
Thanks @annezazu. There has been discussion of enhancing and improving the Link UI in regard to providing a better interface for discovering and adding different types of link content. The idea suggested is noted 🙇 |
This is now being discussed in #49091 |
Noting feedback from the Front Page Fun call for testing for the FSE Outreach Program:
While I understand we've moved away from a bulk add option, it still is a big ask to expect folks to remember the name of the posts/pages/categories they want to add and creates a lot of additional steps. |
The discussion above reveals this Issue has two possible solutions:
Of these option 1 seems like the most actionable. Option 2 requires Design/UX exploration. |
I've done a little more digging here into why we sometimes get unexpected search results when looking for Posts with similar titles. For example, why does "Newspapers" take precedence over the second "News" page here?: Logically as the search string is I looked into how the REST API works here: The Search endpoint uses When providing the To quote the docs:
Therefore the results shown are a product of the search implementation provided by WP_Query which as I understand it matches based on a SQL I therefore believe "relevance" is shorthand for "order based on the match to the search query". I wonder if anyone with more experience in this area of Core can shed more light on this. Maybe @azaozz or @ironprogrammer would know or at least have an idea of who to ask? |
Update: I moved this to a separate Issue in #38121
@richtabor On this point, I wonder whether we could expand upon the UX pattern introduced into the Link UI with the When clicked, it would show a tree representation of all your Pages which you could pick from. I believe that a dedicated view is best because trying to shoehorn in a hierarchical, nested view into the Link UI search results will only add further complication. In envisage this include a UI similar (but not identical) to that I mocked up in this Issue. |
Hey, @getdave -- I looked into this, and may have an explanation of why you're seeing the For a single-term search like
That Perhaps the final sort order could account for exact matches, which would score higher relevance than being part of a word like "Newspaper"? |
I think you are right. Optimising the weighting algorithm on the JS side to prefer exact matches could solve this issue. Thank you so much for all that work 🙇 |
@ironprogrammer I created #67367 to attempt to resolve this. Reviews much appreciated. |
Update: I've revised this Issue to be focused on the relevance of the search results. I've spun out other concerns into a separate Issue.
In summary the Post search results shown are sometimes counterintuitive and we may need to refine the REST API search endpoint to improve this.
Original Issue description
What problem does this address?
This week, Anna Morris shared the following feedback in the FSE Outreach Program's channel:
At the core of this is the experience of what appears upon searching for something to add to the navigation block. Right now, it's a bit odd what's displayed. Here are two very simple examples:
I search for "test" and "testing duotone" comes up before the post actually titled "test":
I search for "contact" and the one with the worse permalink (/contact-2) appears first:
It seems we might be overly biasing for recently updated rather than name matches?
What is your proposed solution?
I'm not quite sure! This is too high level and obvious to say but add more granularity to the search functionality. I imagine this problem will likely ease when one can bulk add items/see more at once: #31667
The text was updated successfully, but these errors were encountered: