Skip to content

Stemming: clarify that stem_dictionary disables Snowball fallback - #493

Open
YonoYing wants to merge 1 commit into
typesense:masterfrom
YonoYing:docs/stemming-dictionary-snowball-clarification
Open

Stemming: clarify that stem_dictionary disables Snowball fallback#493
YonoYing wants to merge 1 commit into
typesense:masterfrom
YonoYing:docs/stemming-dictionary-snowball-clarification

Conversation

@YonoYing

Copy link
Copy Markdown
Contributor

When both stem:true and stem_dictionary are set on a field, only the dictionary is used; Snowball does not run as a fallback for words absent from the dictionary. Replace the ambiguous 'takes precedence' wording in the 30.2 and 29.1 stemming docs. Ref typesense/typesense#2978.

Change Summary

Changing the note:
"When explicitly configuring both options on the same field, dictionary stemming takes precedence"
to
"When explicitly configuring both options on the same field, only dictionary stems will be used. In this case snowball's stemming options should be exported and added to the stemming dictionary manually instead."

This feels like behavior where the fallback would be the more intuitive behavior, but probably is a low priority feature to add, so for now this seems OK in the docs.

PR Checklist

When both stem:true and stem_dictionary are set on a field, only the
dictionary is used; Snowball does not run as a fallback for words absent
from the dictionary. Replace the ambiguous 'takes precedence' wording in
the 30.2 and 29.1 stemming docs. Ref typesense/typesense#2978.

@tharropoulos tharropoulos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a comma :shipit:

1. Using `"stem": true` alone applies the default Porter stemmer algorithm
1. Using `"stem_dictionary": "dictionary_name"` automatically enables stemming functionality (`"stem": true` is implied)
1. When explicitly configuring both options on the same field, dictionary stemming takes precedence
1. When explicitly configuring both options on the same field, only dictionary stems will be used. In this case snowball's stemming options should be exported and added to the stemming dictionary manually instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In this case , snowball's

1. Using `"stem": true` alone applies the default Porter stemmer algorithm
1. Using `"stem_dictionary": "dictionary_name"` automatically enables stemming functionality (`"stem": true` is implied)
1. When explicitly configuring both options on the same field, dictionary stemming takes precedence
1. When explicitly configuring both options on the same field, only dictionary stems will be used. In this case snowball's stemming options should be exported and added to the stemming dictionary manually instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here

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.

2 participants