FileDocCategorySizeDatePackage
PrefixFilter.javaAPI DocApache Lucene 2.2.03018Sat Jun 16 22:20:34 BST 2007org.apache.lucene.search

PrefixFilter

public class PrefixFilter extends Filter
author
yonik
version
$Id$

Fields Summary
protected final Term
prefix
Constructors Summary
public PrefixFilter(Term prefix)

    this.prefix = prefix;
  
Methods Summary
public java.util.BitSetbits(org.apache.lucene.index.IndexReader reader)

    final BitSet bitSet = new BitSet(reader.maxDoc());
    new PrefixGenerator(prefix) {
      public void handleDoc(int doc) {
        bitSet.set(doc);
      }
    }.generate(reader);
    return bitSet;
  
public org.apache.lucene.index.TermgetPrefix()

 return prefix; 
public java.lang.StringtoString()
Prints a user-readable version of this query.

    StringBuffer buffer = new StringBuffer();
    buffer.append("PrefixFilter(");
    buffer.append(prefix.toString());
    buffer.append(")");
    return buffer.toString();