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
Existing tags not showing up as an exact match in search bar autosuggestions #9623
Comments
Thanks for opening your first issue! This space is protected by our Code of Conduct - and we're here to help. |
Hi @bhamster07 thank you for a very clearly documented observation and idea! ✨ I'm going to try to tease out some details here to help. My questions:
OK, so to 1) i see this endpoint where we're responding to autocompletion: https://publiclab.org/tag/suggested/mapping (only accessible via JavaScript): plots2/app/controllers/tag_controller.rb Lines 394 to 401 in 158fadc
Note this is different from the tag autocompletion in the search box on https://publiclab.org/tags, which is from this segment of code. As to 5) i want to cautiously say the only other place we're using this code is on https://publiclab.org/search/tags I think that means we could insert the exact match at the top of the list in this deeper API code: plots2/app/services/search_service.rb Lines 79 to 91 in 158fadc
I'd like also to write a functional test for this to confirm that the top match is the exact match. I think this would be based on this test, and follow it, using an entire word like "spectrometer": plots2/test/functional/tag_controller_test.rb Lines 435 to 440 in 3a05ae2
This is great because for the partial match we'd still see this ordering: plots2/test/functional/tag_controller_test.rb Line 439 in 3a05ae2
But in the exact match we'd see items 1 and 2 swap places. That should be a great and specific test. I want to propose adding this to the Tagging project for our combined Outreachy and GSoC teams! cc @17sushmita @Manasa2850 (more soon on how your project plans may overlap! 🎉) |
Thanks so much for building this issue out with all these details @jywarren ! 😄 |
Please describe the problem (or idea)
Not quite a bug, but more of an observation that I didn't realize was limiting the results I'd see when using the search bar: when previously searching for mapping content, I entered
mapping
into the search bar, and that tag didn't appear in the autosuggested list of tags (see screenshot). But today I saw themapping
tag on a post and clicked on it, and saw from the tag page that there's quite a lot of content there tagged withmapping
!I expected to see
mapping
appear in the autosuggested list of tags as an exact match when entering that term into the search bar, given that themapping
tag page exists and there's lots of content attached to that tag.Please show us where to look
Existing content with the
mapping
tag: https://publiclab.org/tag/mappingWhat's your PublicLab.org username?
bhamster
The text was updated successfully, but these errors were encountered: