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

query_string_query should take term length into consideration when fuzziness is auto #20299

Merged
merged 1 commit into from
Sep 2, 2016

Conversation

masaruh
Copy link
Contributor

@masaruh masaruh commented Sep 2, 2016

Fixes #15972

@@ -114,7 +114,7 @@ public void reset(QueryParserSettings settings) {
@Override
Query handleBareFuzzy(String qfield, Token fuzzySlop, String termImage) throws ParseException {
if (fuzzySlop.image.length() == 1) {
return getFuzzyQuery(qfield, termImage, Float.toString(fuzzyMinSim));
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove fuzzyMinSim entirely from this class, it looks unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. It's not used. But it's super class's field. I'm going to remove a line setting the value.

@jpountz
Copy link
Contributor

jpountz commented Sep 2, 2016

Looks good, I left a suggestion for a cleanup.

@jpountz
Copy link
Contributor

jpountz commented Sep 2, 2016

LGTM

@masaruh masaruh merged commit af959c0 into elastic:master Sep 2, 2016
@masaruh masaruh deleted the query_string_fuzzy branch September 2, 2016 14:33
@masaruh
Copy link
Contributor Author

masaruh commented Sep 2, 2016

Thanks @jpountz!

@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories v5.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants