org.apache.lucene.search

## Class MultiTermQueryWrapperFilter<Q extends MultiTermQuery>

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.search.Filter
    - - org.apache.lucene.search.MultiTermQueryWrapperFilter<Q>

- All Implemented Interfaces:
    Cloneable
  Direct Known Subclasses:
    NumericRangeFilter, PrefixFilter, TermRangeFilter

  Deprecated.
  Use `MultiTermQueryConstantScoreWrapper` instead

      @Deprecated
      public class MultiTermQueryWrapperFilter<Q extends MultiTermQuery>
      extends Filter

  A wrapper for `MultiTermQuery`, that exposes its functionality as a `Filter`.

  `MultiTermQueryWrapperFilter` is not designed to be used by itself. Normally you subclass it to provide a Filter counterpart for a `MultiTermQuery` subclass.

  For example, `TermRangeFilter` and `PrefixFilter` extend `MultiTermQueryWrapperFilter`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Q` | `query` Deprecated.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MultiTermQueryWrapperFilter(Q query)` Deprecated. Wrap a `MultiTermQuery` as a Filter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)` Deprecated.
    `DocIdSet` | `getDocIdSet(LeafReaderContext context, Bits acceptDocs)` Deprecated. Returns a DocIdSet with documents that should be permitted in search results.
    `String` | `getField()` Deprecated. Returns the field name for this query
    `int` | `hashCode()` Deprecated.
    `String` | `toString(String field)` Deprecated. Prints a query to a string, with `field` assumed to be the default field and omitted.

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

      `rewrite`

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

      `clone, createWeight, getBoost, setBoost, toString`

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

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

- - ### Field Detail

    - #### query

          protected final Q extends MultiTermQuery query

      Deprecated.

  - ### Constructor Detail

    - #### MultiTermQueryWrapperFilter

          protected MultiTermQueryWrapperFilter(Q query)

      Deprecated.
      Wrap a `MultiTermQuery` as a Filter.

  - ### Method Detail

    - #### toString

          public String toString(String field)

      Deprecated.
      Description copied from class: `Query`
      Prints a query to a string, with `field` assumed to be the default field and omitted.
      Specified by:
        `toString` in class `Query`

    - #### equals

          public final boolean equals(Object o)

      Deprecated.
      Overrides:
        `equals` in class `Query`

    - #### hashCode

          public final int hashCode()

      Deprecated.
      Overrides:
        `hashCode` in class `Query`

    - #### getField

          public final String getField()

      Deprecated.
      Returns the field name for this query

    - #### getDocIdSet

          public DocIdSet getDocIdSet(LeafReaderContext context,
                             Bits acceptDocs)
                               throws IOException

      Deprecated.
      Returns a DocIdSet with documents that should be permitted in search results.
      Specified by:
        `getDocIdSet` in class `Filter`
      Parameters:
        `context` - a `LeafReaderContext` instance opened on the index currently searched on. Note, it is likely that the provided reader info does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment. The provided context is always an atomic context, so you can call `LeafReader.fields()` on the context's reader, for example.
        `acceptDocs` - Bits that represent the allowable docs to match (typically deleted docs but possibly filtering other documents)
      Returns:
        a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: `null` should be returned if the filter doesn't accept any documents otherwise internal optimization might not apply in the case an empty `DocIdSet` is returned.
      Throws:
        `IOException`

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