Prioritize tag search matches in the beginning of the result #1690
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.