Skip to content

Conversation

cglukas
Copy link

@cglukas cglukas commented Sep 15, 2025

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:

  • The splitQuery will discard hyphens which define the excluded terms
  • The performTermsSearch will abort the search if any excluded term is matched

References

Closes #13892

.filter((term) => term); // remove remaining empty strings
var splitQuery = (query) => {
const consecutiveLetters =
/[\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu;
Copy link
Author

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;
Copy link
Author

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!

@cglukas
Copy link
Author

cglukas commented Sep 15, 2025

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.

@jayaddison
Copy link
Contributor

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).

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.

Word exclusion breaks search
2 participants