Skip to content
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

Implement more relevant textual search queries #558

Open
6 tasks
myssto opened this issue Dec 12, 2024 · 0 comments
Open
6 tasks

Implement more relevant textual search queries #558

myssto opened this issue Dec 12, 2024 · 0 comments
Labels
area:matches area:players area:tournaments database:schema-change Items that contain or propose schema changes to the database project:Database Items related to the Database project type:feature

Comments

@myssto
Copy link
Contributor

myssto commented Dec 12, 2024

SQL Full text search

Currently to search by name for tournaments, matches, players, etc we are using EF.Functions.ILike() (ref) which often produces results that are questionably relevant with no way to sort.

I think the most promising and straightforward solution to this would be to start using full text search, which NpgSQL has native support for within EF. This would allow us to perform natural language text searches instead of pattern matching, as well as being able to sort the results by "relevance" (how well the input matches the text vector).

References

High level task overview

  • Configure database tables with full text search indices
    • tournaments should be compound { name, abbreviation }
    • matches should be { name }
    • players should be { username }
  • Identify most relevant full text search operation to utilize (likely websearch_to_tsquery from reading a bit of the documentation)
    • Update existing queries that use EF.Functions.ILike() to use full text search operations (i.e. TournamentsRepository.SearchAsync(), IQueryable<Match>.WhereName())
@myssto myssto added area:matches area:players area:tournaments database:schema-change Items that contain or propose schema changes to the database project:Database Items related to the Database project type:feature labels Dec 12, 2024
@github-project-automation github-project-automation bot moved this to Backlog in otr-beta-v2 Dec 12, 2024
@myssto myssto moved this from Backlog to Ready in otr-beta-v2 Dec 12, 2024
@hburn7 hburn7 removed this from otr-beta-v2 Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:matches area:players area:tournaments database:schema-change Items that contain or propose schema changes to the database project:Database Items related to the Database project type:feature
Projects
None yet
Development

No branches or pull requests

1 participant