-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Search: Fix word exclusion in client side search #13893
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
base: master
Are you sure you want to change the base?
Conversation
.filter((term) => term); // remove remaining empty strings | ||
var splitQuery = (query) => { | ||
const consecutiveLetters = | ||
/[\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu; |
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.
IDK if it's bad to define is regex first and reference it later in the new regex. It could also be plain text. But I thought this way, the origin of the regex can be easier understood.
}) | ||
) | ||
break; | ||
continue; |
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.
This is probably the most important change!
Regarding the CI: I don't see any changes on my PR which would trigger the current CI fail. Is this a common issue? TBH it does not look like it's affecting the master branch too 🤔. I'm a little aimless what to do here. |
That's OK, yep - I believe that is due to bug #13886 (in progress, potentially to be fixed by #13883). |
Purpose
The built-in search is capable of excluding search terms. Thats a great feature which would make the search a lot better!
Unfortunately, there are two blocking components:
splitQuery
will discard hyphens which define the excluded termsperformTermsSearch
will abort the search if any excluded term is matchedReferences
Closes #13892