Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-3545

.withPrefixLength is ignored for .keyword().fuzzy() queries in the Elasticsearch integration

    Details

      Description

      The bug is located in org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder#createRemoteQuery:

      		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 ) );
      		}
      

      We forgot to get and set the prefix length in this block.

      Only Hibernate Search 5.x is affected.

        Attachments

          Activity

            People

            • Assignee:
              fercoli Fabio Massimo Ercoli
              Reporter:
              yrodiere Yoann Rodière
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: