BlendedTermQuery.DisjunctionMaxRewrite (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.search, class: BlendedTermQuery, class: DisjunctionMaxRewrite

Package 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
  Description
  `DisjunctionMaxRewrite(float tieBreakerMultiplier)`
  This `BlendedTermQuery.RewriteMethod` will create `DisjunctionMaxQuery` instances that have the provided tie breaker.

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### DisjunctionMaxRewrite

    public DisjunctionMaxRewrite(float tieBreakerMultiplier)
    This `BlendedTermQuery.RewriteMethod` will create `DisjunctionMaxQuery` instances that have the provided tie breaker.
    See Also:
      - `DisjunctionMaxQuery`

- ## Method Details

  - ### 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`