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

DOP-3032: adding synonyms to search queries #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

schmalliso
Copy link
Contributor

DO NOT MERGE until we're confident that this won't break everything.

Per the docs, we need to add a 'synonyms' field to the $search agg pipeline stage if you wish to use synonyms in your searching. This should do that.

search_synonyms is currently configured in search-staging.documents, my intention is to copy that over to prod once we test this, assuming it's possible to test this only in staging. For what it's worth, if you include the synonyms bit in the query and you've not configured synonyms, you get an angry error:

MongoServerError: Remote error from mongot :: caused by :: unknown synonym mapping name "search_synonyms"

Copy link
Collaborator

@i80and i80and left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me. I might suggest that our required index setup be listed in a README.md file just so it's documented, since the specific index setup required for this to run is starting to get nontrivial

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

Successfully merging this pull request may close these issues.

2 participants