org.apache.lucene.search

## Class PrefixFilter

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

- All Implemented Interfaces:
    Cloneable

  Deprecated.
  Use `PrefixQuery` and `BooleanClause.Occur.FILTER` clauses instead.

      @Deprecated
      public class PrefixFilter
      extends MultiTermQueryWrapperFilter<PrefixQuery>

  A Filter that restricts search results to values that have a matching prefix in a given field.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter

      `query`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrefixFilter(Term prefix)` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Term` | `getPrefix()` Deprecated.
    `String` | `toString(String field)` Deprecated. Prints a user-readable version of this filter.

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

      `equals, getDocIdSet, getField, hashCode`

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

- - ### Constructor Detail

    - #### PrefixFilter

          public PrefixFilter(Term prefix)

      Deprecated.

  - ### Method Detail

    - #### getPrefix

          public Term getPrefix()

      Deprecated.

    - #### toString

          public String toString(String field)

      Deprecated.
      Prints a user-readable version of this filter.
      Overrides:
        `toString` in class `MultiTermQueryWrapperFilter<PrefixQuery>`

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