-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix synonyms documentation #100916
Fix synonyms documentation #100916
Conversation
Documentation preview: |
Pinging @elastic/es-docs (Team:Docs) |
In the above example, text will be lowercased by the `lowercase` filter before being processed by the `synonyms_filter`. | ||
This means that all the synonyms defined there needs to be in lowercase, or they won't be found by the synonyms filter. | ||
{es} will also use the token filters preceding the synonym filter in a tokenizer chain to parse the entries in a synonym file. | ||
In the above example, the synonyms graph token filter is placed after a stemmer. The stemmer will also be applied to the synonym entries. |
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.
May be we can say it shorter to avoid repetitions:
Order is important for your token filters.
Text will be processed first through filters preceding the synonym filter before being processed by the synonym filter.
For example, for the above analyzer, {es} will first apply `stemmer` filter to the text, and after that apply `synonym_graph` token filter.
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.
@mayya-sharipova its important to clarify if we also apply the token filters on the synonyms when they are loaded from the file. This way any stemmer is also applied to the previously stored synonyms.
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.
I've tried to make the example as close as possible to the previous one to avoid further confusion. I've added synonym set as well to synonym file to ensure users understand that it applies to any synonym configuration.
💚 Backport successful
|
Fix documentation related synonym / synonym graph token filters