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

Rename fuzziness/min_similarity to edit_distance #4587

Merged
merged 1 commit into from Jan 9, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jan 2, 2014

A lot of different API's currently use different names for the
same logical parameter. Since lucene moved away from the notion
of a similarity and now uses an edit distance we should generalize
this and encapsulate the generation, parsing and creation of these
settings across all queries.

This commit adds a new EditDistance class that handles the renaming
and generalization in a backwards compatible manner.

Closes #4082

`Edit Distance`:: a minimum Levenshtein Distance (`0`, `1`, `2`) `2` edits are the maximum supported distance.
`Similarity`:: a minimum similarity value between 0 and 1 to set the required similarity
between the query term and the matching terms. For example, for a similarity
of `0.5` a term of the same length as the query term is considered similar
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't "of same length" superfluous? When I read the description, I was confused what would happen for terms that have different lengths

@jpountz
Copy link
Contributor

jpountz commented Jan 8, 2014

+1

A lot of different API's currently use different names for the
same logical parameter. Since lucene moved away from the notion
of a `similarity` and now uses an `fuzziness` we should generalize
this and encapsulate the generation, parsing and creation of these
settings across all queries.

This commit adds a new `Fuzziness` class that handles the renaming
and generalization in a backwards compatible manner.

This commit also added a ParseField class to better support deprecated
Query DSL parameters

The ParseField class allows specifying parameger that have been deprecated.
Those parameters can be more easily tracked and removed in future version.
This also allows to run queries in `strict` mode per index to throw
exceptions if a query is executed with deprected keys.

Closes elastic#4082
@s1monw s1monw merged commit bc5a9ca into elastic:master Jan 9, 2014
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.

Rename fuzziness/min_similarity to edit_distance
2 participants