-
Notifications
You must be signed in to change notification settings - Fork 141
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
Improve Search Algorithm #793
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -592,7 +592,7 @@ describe('MongoDB Words', () => { | |||
}); | |||
|
|||
describe('/GET mongodb words V2', () => { | |||
it('return word parts of mgba for noun deconstruction', async () => { | |||
it.skip('return word parts of mgba for noun deconstruction', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skipping for now since we no longer call expandNoun
@@ -28,7 +28,7 @@ | |||
"dev:full:database": "npm-run-all -p start:watch start:emulators start:database:replica", | |||
"dev:light": "npm-run-all -p start:watch start:database", | |||
"dev:site": "npm-run-all -p start:emulators dev:site:next", | |||
"dev:site:next": "firebase functions:config:set runtime.env=development && next", | |||
"dev:site:next": "firebase functions:config:set runtime.env=development && next -p 3035", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicitly setting the dev port to avoid clashing with other nkowaokwu
projects
})) | ||
: // @ts-expect-error no index signature with parameter type string | ||
[{ text: searchWordPart, wordClass: [], regex: regexes[searchWordPart] }]; | ||
// if (!keywords.length && searchWord) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer calling expandNoun
to avoid false matches
)}${'\u1e44\u01f9\u0144\u1e45\u01f8\u0143]'.normalize('NFC')}+[\u00B4\u0301\u0060\u00AF\u0304\u0323\u0300]{0,}`; | ||
const caseInsensitiveM = `${'[m\u1e44\u01f9\u0144M\u1e45\u01f8\u0143'.normalize( | ||
)}${'\u1e44\u01f9\u0144\u1e45\u01f8\u0143]'.normalize('NFC')}+[${ALL_DIACRITICS}]{0,}`; | ||
const caseInsensitiveM = `${'[m\u1e40\u1e3fM\u1e41\u1e3e'.normalize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turns out we copied the letter N's Unicode values instead of the letter M's
Describe your changes
expandNoun
helper function. This helper function has been leading to a lot of false matches which confuses end users and ultimately lowers their trust in the quality of the platform.wordReg
,definitionsReg
, andexamplesReg
would not only include the letter m but also the letter m in the regexes, which led to a lot of false matches.Issue ticket number and link
Closed #785
Motivation and Context
Recently the quality of search has been pretty low.
How Has This Been Tested?
Ran all unit tests locally and updated stale tests.
Screenshots (if appropriate):
N/A