usgo / agagd

American Go Association Games Database (AGAGD)
https://agagd.usgo.org
MIT License
47 stars 30 forks source link

Index DB for full_name & family_name, hopefully addressing #52 #54

Closed dfannius closed 5 years ago

dfannius commented 5 years ago

Per the request at https://github.com/usgo/agagd/issues/52#issuecomment-510187439, here is a PR, with the caveats that

  1. This change is insufficient by itself; you need to also either run a database migration or manually add the indexes for full_name and family_name to the database.

  2. This is black-box debugging, just performed by looking at the code in the repository and observing the behavior of the website, so it's not guaranteed to fix the issue. It is the best practice anyway, though.

dfannius commented 5 years ago

We realized after the initial commit that indexing the database by family_name will not by itself help with substring searches. Therefore commit https://github.com/usgo/agagd/pull/54/commits/3ae525788170a87daf8f70c008275ee91d7b68a5 changes the search to an exact (case-insensitive) search on family name. This is a subset of the functionality that used to exist, but is much more functionality than not working at all. (From our vantage point, we don't know why the original functionality used to be fast on the old server.) Of course it is your call whether you want to try it out.

michaelhiiva commented 5 years ago

This is resolved in #55.

@dfannius Thank you for this patch.