MultiTermQuery.RewriteMethod (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.search, class: MultiTermQuery, class: RewriteMethod

Package org.apache.lucene.search

# Class MultiTermQuery.RewriteMethod

java.lang.Object
org.apache.lucene.search.MultiTermQuery.RewriteMethod

Direct Known Subclasses:
  `DocValuesRewriteMethod`, `ScoringRewrite`, `TopTermsRewrite`

Enclosing class:
  `MultiTermQuery`

public abstract static class MultiTermQuery.RewriteMethod extends Object
Abstract class that defines how the query is rewritten.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RewriteMethod()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected TermsEnum`
  `getTermsEnum(MultiTermQuery query, Terms terms, AttributeSource atts)`
  Returns the `MultiTermQuery`s `TermsEnum`
  `abstract Query`
  `rewrite(IndexSearcher indexSearcher, MultiTermQuery query)`

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

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

- ## Constructor Details

  - ### RewriteMethod

    public RewriteMethod()

- ## Method Details

  - ### rewrite

    public abstract Query rewrite(IndexSearcher indexSearcher, MultiTermQuery query) throws IOException
    Throws:
      `IOException`

  - ### getTermsEnum

    protected TermsEnum getTermsEnum(MultiTermQuery query, Terms terms, AttributeSource atts) throws IOException
    Returns the `MultiTermQuery`s `TermsEnum`
    Throws:
      `IOException`
    See Also:
      - `MultiTermQuery.getTermsEnum(Terms, AttributeSource)`