org.apache.lucene.search
Class Filter

java.lang.Object
  extended by 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


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