Repository navigation
feat: whole-word keyword search - #7
Merged
Merged
Conversation
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.
Keyword search used to match text inside words, which gave noisy results for short Hebrew roots: searching for the word for ornamental plantings also found "construction", "evacuation" and "neuro", and searching for "trees" also found "consultants". This adds a
whole_wordoption toMichraz.searchand a--whole-wordflag to the command line that matches whole words only. Hebrew prefix letters (and, the, as, to, from, in, that) are allowed in front of the word, so the word for "flowers" still finds "the flowers" and "to the flowers". Substring matching stays the default, so nothing changes for existing callers. On live data today the ornamental search drops from 9 results to the 1 real one, and the trees search from 4 to 2. All checks pass locally with 274 tests, and the README and changelog are updated.