org.apache.lucene.classification.utils

## Class NearestFuzzyQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.classification.utils.NearestFuzzyQuery

-     public class NearestFuzzyQuery
      extends Query

  Simplification of FuzzyLikeThisQuery, to be used in the context of KNN classification.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NearestFuzzyQuery(Analyzer analyzer)` Default constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTerms(String queryString, String fieldName)` Adds user input for "fuzzification"
    `boolean` | `equals(Object other)`
    `int` | `hashCode()`
    `Query` | `rewrite(IndexReader reader)`
    `String` | `toString(String field)`

    - ### Methods inherited from class org.apache.lucene.search.Query

      `classHash, createWeight, sameClassAs, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NearestFuzzyQuery

          public NearestFuzzyQuery(Analyzer analyzer)

      Default constructor
      Parameters:
        `analyzer` - the analyzer used to proecss the query text

  - ### Method Detail

    - #### addTerms

          public void addTerms(String queryString,
                               String fieldName)

      Adds user input for "fuzzification"
      Parameters:
        `queryString` - The string which will be parsed by the analyzer and for which fuzzy variants will be parsed

    - #### rewrite

          public Query rewrite(IndexReader reader)
                        throws IOException

      Overrides:
        `rewrite` in class `Query`
      Throws:
        `IOException`

    - #### toString

          public String toString(String field)

      Specified by:
        `toString` in class `Query`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `Query`

    - #### equals

          public boolean equals(Object other)

      Specified by:
        `equals` in class `Query`

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.