Filter (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.Filter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search
Class Filter

    java.lang.Object
      org.apache.lucene.search.Filter

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CachingWrapperFilter, PrefixFilter, QueryWrapperFilter, RangeFilter, RemoteCachingWrapperFilter, SpanFilter

    public abstract class Filter

extends Object
implements Serializable

Abstract base class providing a mechanism to use a subset of an index for restriction or permission of index search results.

Note: In Lucene 3.0 `bits(IndexReader)` will be removed and `getDocIdSet(IndexReader)` will be defined as abstract. All implementing classes must therefore implement `getDocIdSet(IndexReader)` in order to work with Lucene 3.0.

See Also:
  Serialized Form

Constructor Summary
`Filter()`

Method Summary
`BitSet` | `bits(IndexReader reader)` Deprecated. Use `getDocIdSet(IndexReader)` instead.
`DocIdSet` | `getDocIdSet(IndexReader reader)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Filter

    public Filter()

Method Detail

### bits

    public BitSet bits(IndexReader reader)
                throws IOException

  Deprecated. Use `getDocIdSet(IndexReader)` instead.

  Returns:
    A BitSet with true for documents which should be permitted in search results, and false for those that should not.
  Throws:
    `IOException`

### getDocIdSet

    public DocIdSet getDocIdSet(IndexReader reader)
                         throws IOException

  Returns:
    a DocIdSet that provides the documents which should be permitted or prohibited in search results.
  Throws:
    `IOException`
  See Also:
    `DocIdBitSet`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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