[hibernate-issues] [JIRA] (HSEARCH-3888) How to query in "Hibernate Search" fuzzy mode with FuzzyContext.withEditDistanceUpTo() with more than 2 "changes"?

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Wed Apr 8 11:39:56 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *closed* an issue as *Rejected*

Please use discourse ( https://discourse.hibernate.org/c/hibernate-search ) or stackoverflow ( https://stackoverflow.com/questions/tagged/hibernate-search ) for usage questions, and only create tickets for feature requests with a documented use cases or bug reports.

As to your question: it's not possible. Lucene only supports a Levenshtein distance of at most 2. That's hardcoded into the algorithm. See the javadoc of org.apache.lucene.search.FuzzyQuery#FuzzyQuery(org.apache.lucene.index.Term, int, int, int, boolean) and org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE.
There may be other ways to achieve what you are trying to do, however. Post a question explaining your problem in more details, and maybe someone will suggest a solution.

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiNWNiYzkwZjhkNTE3NDVmNWE3ZDFiODFjNjBiYTYwMzMiLCJwIjoiaiJ9 ) / New Feature ( https://hibernate.atlassian.net/browse/HSEARCH-3888?atlOrigin=eyJpIjoiNWNiYzkwZjhkNTE3NDVmNWE3ZDFiODFjNjBiYTYwMzMiLCJwIjoiaiJ9 ) HSEARCH-3888 ( https://hibernate.atlassian.net/browse/HSEARCH-3888?atlOrigin=eyJpIjoiNWNiYzkwZjhkNTE3NDVmNWE3ZDFiODFjNjBiYTYwMzMiLCJwIjoiaiJ9 ) How to query in "Hibernate Search" fuzzy mode with FuzzyContext.withEditDistanceUpTo() with more than 2 "changes"? ( https://hibernate.atlassian.net/browse/HSEARCH-3888?atlOrigin=eyJpIjoiNWNiYzkwZjhkNTE3NDVmNWE3ZDFiODFjNjBiYTYwMzMiLCJwIjoiaiJ9 )

Change By: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) Assignee: Yoann Rodière Resolution: Rejected Status: Open Closed

( https://hibernate.atlassian.net/browse/HSEARCH-3888#add-comment?atlOrigin=eyJpIjoiNWNiYzkwZjhkNTE3NDVmNWE3ZDFiODFjNjBiYTYwMzMiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3888#add-comment?atlOrigin=eyJpIjoiNWNiYzkwZjhkNTE3NDVmNWE3ZDFiODFjNjBiYTYwMzMiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124- sha1:c13ca0d )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200408/c8029346/attachment.html 


More information about the hibernate-issues mailing list