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

introduce fts_term() function for preparing tokens for FTS5 token matching #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

missinglink
Copy link
Member

I noticed what appears to be a bug in the code but appears to have no negative effects on the quality of results.

There is a piece of code which replaces all occurrences of space with underscore (.replace(/ /g, '_')).

I don't remember exactly why we do this but I assume its to allow us to keep multi-word tokens (such as 'new york') as a single token.

Recently we started using the FTS index more, so we should apply this space->underscore replacement in all parts of the code which use the FTS index.

Now.. why it 'just works' anyway is a bit of a mystery 🤷

@orangejulius
Copy link
Member

I just rebased this after fixing the tests in #221, do we still want to merge it? I don't recall if we tested the changes in this PR or what we think it might have helped with. Performance maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants