Package org.apache.lucene.queries.function

## Class FunctionMatchQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.queries.function.FunctionMatchQuery

-     public final class FunctionMatchQuery
      extends Query

  A query that retrieves all documents with a `DoubleValues` value matching a predicate

  This query works by a linear scan of the index, and is best used in conjunction with other queries that can restrict the number of documents visited

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FunctionMatchQuery​(DoubleValuesSource source, DoublePredicate filter)` | Create a FunctionMatchQuery with default TwoPhaseIterator matchCost - `DEFAULT_MATCH_COST` = 100.0f
    `FunctionMatchQuery​(DoubleValuesSource source, DoublePredicate filter, float matchCost)` | Create a FunctionMatchQuery

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Weight` | `createWeight​(IndexSearcher searcher, ScoreMode scoreMode, float boost)` |
    `boolean` | `equals​(Object o)` |
    `int` | `hashCode()` |
    `String` | `toString​(String field)` |
    `void` | `visit​(QueryVisitor visitor)` |

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

      `classHash, rewrite, rewrite, sameClassAs, toString`

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

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

- - ### Constructor Detail

    - #### FunctionMatchQuery

          public FunctionMatchQuery​(DoubleValuesSource source,
                                    DoublePredicate filter)

      Create a FunctionMatchQuery with default TwoPhaseIterator matchCost - `DEFAULT_MATCH_COST` = 100.0f
      Parameters:
        `source` - a `DoubleValuesSource` to use for values
        `filter` - the predicate to match against

    - #### FunctionMatchQuery

          public FunctionMatchQuery​(DoubleValuesSource source,
                                    DoublePredicate filter,
                                    float matchCost)

      Create a FunctionMatchQuery
      Parameters:
        `source` - a `DoubleValuesSource` to use for values
        `filter` - the predicate to match against
        `matchCost` - to be returned by `TwoPhaseIterator.matchCost()`

  - ### Method Detail

    - #### toString

          public String toString​(String field)

      Specified by:
        `toString` in class `Query`

    - #### visit

          public void visit​(QueryVisitor visitor)

      Specified by:
        `visit` in class `Query`

    - #### createWeight

          public Weight createWeight​(IndexSearcher searcher,
                                     ScoreMode scoreMode,
                                     float boost)
                              throws IOException

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

    - #### equals

          public boolean equals​(Object o)

      Specified by:
        `equals` in class `Query`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `Query`