org.hibernate.search.query.dsl

## Interface FuzzyContext

- All Superinterfaces:
    QueryCustomization<FuzzyContext>

      public interface FuzzyContext
      extends QueryCustomization<FuzzyContext>

  Author:
    Emmanuel Bernard

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `TermMatchingContext` | `onField(String field)` field / property the term query is executed on
    `TermMatchingContext` | `onFields(String... fields)` fields / properties the term query is executed on
    `FuzzyContext` | `withEditDistanceUpTo(int maxEditDistance)` Maximum value of the edit distance.
    `FuzzyContext` | `withPrefixLength(int prefixLength)` Size of the prefix ignored by the fuzzyness.
    `FuzzyContext` | `withThreshold(float threshold)` Deprecated. use `withEditDistanceUpTo(int)`

    - ### Methods inherited from interface org.hibernate.search.query.dsl.QueryCustomization

      `boostedTo, filteredBy, withConstantScore`

- - ### Method Detail

    - #### onField

          TermMatchingContext onField(String field)

      field / property the term query is executed on
      Parameters:
        `field` - the name of the field
      Returns:
        a `TermMatchingContext`

    - #### onFields

          TermMatchingContext onFields(String... fields)

      fields / properties the term query is executed on
      Parameters:
        `fields` - the names of the fields
      Returns:
        a `TermMatchingContext`

    - #### withThreshold

          @Deprecated
          FuzzyContext withThreshold(float threshold)

      Deprecated. use `withEditDistanceUpTo(int)`
      Threshold above which two terms are considered similar enough. Value between 0 and 1 (1 excluded) Defaults to .5
      Parameters:
        `threshold` - the value for the threshold
      Returns:
        a `FuzzyContext`

    - #### withEditDistanceUpTo

          FuzzyContext withEditDistanceUpTo(int maxEditDistance)

      Maximum value of the edit distance. Roughly speaking, the number of changes between two terms to be considered close enough. Can be either 1 or 2 (0 would mean no fuzziness). Defaults to 2.
      Parameters:
        `maxEditDistance` - max value for the edit distance
      Returns:
        a `FuzzyContext`

    - #### withPrefixLength

          FuzzyContext withPrefixLength(int prefixLength)

      Size of the prefix ignored by the fuzzyness. A non zero value is recommended if the index contains a huge amount of distinct terms Defaults to 0
      Parameters:
        `prefixLength` - the length of the prefix
      Returns:
        a `FuzzyContext`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved