Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Oct 21, 2026
A fuzzy FT.SUGGET on one or two characters walks most of the autocomplete dictionary. Keep those results in memory for 60 seconds; longer queries still go to Redis every time, and failed searches aren't kept. Queries made of username characters share an entry across case, since FT.SUGGET ignores case.
ugcodrr
force-pushed
the
fix/autocomplete-short-queries
branch
from
October 29, 2026 20:50
f65b78f to
bb7f7ad
Compare
jacobk999
reviewed
Nov 1, 2026
| @Injectable() | ||
| export class PlayerSearchService { | ||
| private logger = new Logger("PlayerSearchService"); | ||
| private readonly shortQueries = new Map<string, { expiresAt: number; players: Promise<string[]> }>(); |
Member
There was a problem hiding this comment.
I am not a big fan of adding a cache like this because its now making the api somewhat stateful.
|
Deployment failed for project statsify with the following error: Learn More: https://vercel.com/statsify-net?upgradeToPro=build-rate-limit |
ugcodrr
added a commit
that referenced
this pull request
Nov 5, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description: Player search's fuzzy Redis lookup walks most of the ~2M-name dictionary for one- and two-character queries, so those now do a plain prefix lookup instead.
Merge order for the perf PRs is in #1002.
Testing: with
redis-cli monitor | grep FT.SUGGETrunning,/player/search?query=absends noFUZZYand/player/search?query=abcdoes.