edu.mayo.informatics.indexer.lucene
Class ChainableFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by edu.mayo.informatics.indexer.lucene.ChainableFilter
All Implemented Interfaces:
java.io.Serializable

public class ChainableFilter
extends org.apache.lucene.search.Filter

Lucene can only accept one filter at a time. This class allows you to add multipe filters to a lucene query. This was origionally written by Kelvan Tan.

Author:
Dan Armbrust
See Also:
Serialized Form

Field Summary
static int AND
           
static int ANDNOT
           
static int OR
           
static int XOR
           
 
Constructor Summary
ChainableFilter(org.apache.lucene.search.Filter[] chain)
          Creates a new ChainableFilter.
 
Method Summary
 java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
           
 java.util.BitSet bits(org.apache.lucene.index.IndexReader reader, int logic)
           
 
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OR

public static final int OR
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

ANDNOT

public static final int ANDNOT
See Also:
Constant Field Values

XOR

public static final int XOR
See Also:
Constant Field Values
Constructor Detail

ChainableFilter

public ChainableFilter(org.apache.lucene.search.Filter[] chain)
Creates a new ChainableFilter.

Parameters:
chain - The chain of filters.
Method Detail

bits

public java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
                      throws java.io.IOException
Overrides:
bits in class org.apache.lucene.search.Filter
Throws:
java.io.IOException

bits

public java.util.BitSet bits(org.apache.lucene.index.IndexReader reader,
                             int logic)
                      throws java.io.IOException
Throws:
java.io.IOException

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.