org.apache.lucene.search

## Class PrefixFilter

- java.lang.Object
- - org.apache.lucene.search.Filter
  - - org.apache.lucene.search.MultiTermQueryWrapperFilter
    - - org.apache.lucene.search.PrefixFilter

- All Implemented Interfaces:
    java.io.Serializable

      public class PrefixFilter
      extends MultiTermQueryWrapperFilter

  A Filter that restricts search results to values that have a matching prefix in a given field.
  See Also:
    Serialized Form

- - ### Field Summary

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

      `query`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrefixFilter(Term prefix)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Term` | `getPrefix()`
    `java.lang.String` | `toString()` Prints a user-readable version of this query.

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

      `bits, clearTotalNumberOfTerms, equals, getDocIdSet, getTotalNumberOfTerms, hashCode`

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

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

- - ### Constructor Detail

    - #### PrefixFilter

          public PrefixFilter(Term prefix)

  - ### Method Detail

    - #### getPrefix

          public Term getPrefix()

    - #### toString

          public java.lang.String toString()

      Prints a user-readable version of this query.
      Overrides:
        `toString` in class `MultiTermQueryWrapperFilter`

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