-
Notifications
You must be signed in to change notification settings - Fork 25.3k
String distance algorithms cleanup #27640
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
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
if ("internal".equals(distanceVal)) { | ||
return DirectSpellChecker.INTERNAL_LEVENSHTEIN; | ||
} else if ("damerau_levenshtein".equals(distanceVal) || "damerauLevenshtein".equals(distanceVal)) { |
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.
distanceVal
is explicitly converted to lowercase, thus it can never match damerauLevenshtein
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 asked for one wording change, otherwise I'm happy with this.
|
||
==== Term Suggesters supported distance algorithms | ||
|
||
The following suggestion distance algorithms have been removed: |
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 sounds a little more dramatic than it needs to: we haven't removed the algorithms, just the deprecated and non-preferred spellings. Could you reword more gently?
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.
Thanks @DaveCTurner! Can you have another look?
@elasticmachine please test this. |
995b400
to
6cfb15c
Compare
@@ -43,7 +43,8 @@ Scroll queries are not meant to be cached. | |||
|
|||
==== Term Suggesters supported distance algorithms | |||
|
|||
The following suggestion distance algorithms have been removed: | |||
For better readability and consistency the following string distance algorithms |
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.
How about:
The following string distance algorithms were renamed in 6.0 and their old names were deprecated. The deprecated names have now been removed.
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.
How about:
The following string distance algorithms were given additional names in 6.2 and their existing names were deprecated. The deprecated names have now been removed.
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.
Thanks for the suggestions!
@elasticmachine please test this |
LGTM. Kicked off a CI run. |
@olcbean I think your branch is based on a commit in |
thus it can never match `damerauLevenshtein`
52fd037
to
9f3a1b4
Compare
@DaveCTurner thanks! I just rebased and pushed. Can you trigger another build? |
@elasticmachine please test this |
Thanks for your work on this, @olcbean. |
Remove deprecated
levenstein
andjarowinkler
string distance algsRemove
damerauLevenshtein
:distanceVal
is explicitly converted to lowercase, thus it can never matchdamerauLevenshtein
Use the ROOT locale for to lowercase