hubzero / hubzero-cms

Platform for Scientific Collaboration
https://hubzero.org
GNU General Public License v2.0
47 stars 57 forks source link

Prioritize tag search matches in the beginning of the result #1690

Closed ishunko closed 7 months ago

ishunko commented 9 months ago

https://nanohub.org/support/ticket/437145 https://nanohub.org/support/ticket/437145

Updated code to get all tag search matches and prioritize the matches in the beginning of the string result. To achieve this, the code gets all matches from the DB and then parses them to find the matches in the beginning of the string to push these matches to the top of the returned JSON. This approach allows to keep using ORM in the cloud model and not modify the SQL as was suggested earlier in the ticket.