Closed toffehoff closed 3 months ago
Thanks @toffehoff. Based on the way the datatable has been configured, prioritizing search results is a little tricky and would involve a good deal of javascript (which is not my strongest language). I just tested out using a more backend-focused solution using configurable searches set up by the end user. Would something like this fulfill your needs?
Search
Results
This would certainly be an improvement. When you set the default value of the search column to "Acronym", then you only need to fill in the name of the acronym you're looking for. I assume that will be the most used search field. Let's test it out and see what the result is when you search for "RO".
I've pushed this to prod. Here's what searching the acronym (english) column for ro
returns, seems like an improvement?
Definitely an improvement! I don't get 90+ pages anymore :) Still not ideal, but it's workable. A slightly different thing: it would be nice if the person could update the search field and press on "search" again. Instead of going back to the previous page.
I've moved the search bar to the results page so you should be able to modify the results or try again without having to go back. Have a look.
When you use the search function with the Acronyms, there are a lot of results shown. I guess not only the acronym is searched for, but also the description and other fields. If you want to search for the acronym "RO" search is not going to help you much because of the 93 pages of acronyms, you still see 93 pages of acronyms.
Proposal: 1) search level is "all acronyms starting with" [search] So, if you type in "RO", then the first thing you see is the "RO" acronym, followed by other acronyms starting with "RO" 2) At the bottom of the search results have a button "search more", this will show all acronyms that contains the search value. For instance "ARO" and "CRO". 3) At the bottom of that search result there is another button "search more". This will show a list of acronyms in which the search value has been found in the description text.
Overall result: if you do a search in the Acronym list, you most likely have an acronym. So, showing those results first is what you would expect.