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

FuzzyQuery produces a wrong result when prefix is equal to the term length #941

Open
1 task done
tohidemyname opened this issue Jun 4, 2024 · 2 comments
Open
1 task done
Labels

Comments

@tohidemyname
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using FuzzyQuery the search string bba does not match doc value bbab with an edit distance of 1 and prefix length of 3.

In FuzzyQuery an automaton is created for the "suffix" part of the search string which in this case is an empty string.

Expected Behavior

In this scenario maybe the FuzzyQuery should rewrite to a WildcardQuery of the following form :

searchString + "?" 

where there's an appropriate number of ? characters according to the edit distance.

Steps To Reproduce

No response

Exceptions (if any)

No response

Lucene.NET Version

No response

.NET Version

No response

Operating System

No response

Anything else?

No response

@tohidemyname
Copy link
Author

@tohidemyname
Copy link
Author

I fixed two bugs. To submit separate pull requests, I reverted my changes after I fixed a bug. I am unsure whether I wrongly close my pull request or not. I have submitted another pull request:

#945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant