org.apache.lucene.search

## Class BlendedTermQuery.DisjunctionMaxRewrite

- java.lang.Object
- - org.apache.lucene.search.BlendedTermQuery.RewriteMethod
  - - org.apache.lucene.search.BlendedTermQuery.DisjunctionMaxRewrite

- Enclosing class:
    BlendedTermQuery

      public static class BlendedTermQuery.DisjunctionMaxRewrite
      extends BlendedTermQuery.RewriteMethod

  A `BlendedTermQuery.RewriteMethod` that creates a `DisjunctionMaxQuery` out of the sub queries. This `BlendedTermQuery.RewriteMethod` is useful when having a good match on a single field is considered better than having average matches on several fields.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DisjunctionMaxRewrite(float tieBreakerMultiplier)` This `BlendedTermQuery.RewriteMethod` will create `DisjunctionMaxQuery` instances that have the provided tie breaker.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `Query` | `rewrite(Query[] subQueries)` Merge the provided sub queries into a single `Query` object.

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

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

- - ### Constructor Detail

    - #### DisjunctionMaxRewrite

          public DisjunctionMaxRewrite(float tieBreakerMultiplier)

      This `BlendedTermQuery.RewriteMethod` will create `DisjunctionMaxQuery` instances that have the provided tie breaker.
      See Also:
        `DisjunctionMaxQuery`

  - ### Method Detail

    - #### rewrite

          public Query rewrite(Query[] subQueries)

      Description copied from class: `BlendedTermQuery.RewriteMethod`
      Merge the provided sub queries into a single `Query` object.
      Specified by:
        `rewrite` in class `BlendedTermQuery.RewriteMethod`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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