Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Although searching also by the Agent's description (#830) was a great addition, it has made it difficult to identify an Agent by typing just a few letters, because the descriptions of Agents contains a lot of random words that may often accidentally match your query, and the matched Agents are listed in the original order. To solve the problem, this commit introduces the scoring and sorting of matched items making use of select2 4.0's enhanced matcher. With this improvement, Agents with a specified keyword in their names will be listed first followed by ones with the keyword in their descriptions. Among each group, Agents are sorted by the position where the keyword has matched in the title or description so that one can easily pick an Agent by the name that one already knows, while it is still possible to find an Agent one doesn't remember exactly nor even know of.
- Loading branch information