The bug is located in {{org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder#createRemoteQuery}}:
{code} if ( termContext.getApproximation() == TermQueryContext.Approximation.FUZZY ) { // TODO: remove the threshold method as it's deprecated and not accurate // the max edit distance based on the total searchTerm length which is wrong // It might be a good time to consider removing the deprecated threshold method queryBuilder.maxEditDistance( getMaxEditDistance( searchTerm ) ); } {code}
We forgot to get and set the prefix length in this block.
Only Hibernate Search 5.x is affected. |
|