org.apache.lucene.search
Class BooleanFilter
java.lang.Object
org.apache.lucene.search.Filter
org.apache.lucene.search.BooleanFilter
- All Implemented Interfaces:
- java.io.Serializable
public class BooleanFilter
- extends Filter
A container Filter that allows Boolean composition of Filters.
Filters are allocated into one of three logical constructs;
SHOULD, MUST NOT, MUST
The results Filter BitSet is constructed as follows:
SHOULD Filters are OR'd together
The resulting Filter is NOT'd with the NOT Filters
The resulting Filter is AND'd with the MUST Filters
- Author:
- BPDThebault
- See Also:
- Serialized Form
Method Summary |
void |
add(FilterClause filterClause)
Adds a new FilterClause to the Boolean Filter container |
java.util.BitSet |
bits(IndexReader reader)
Returns the a BitSet representing the Boolean composition
of the filters that have been added. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
BooleanFilter
public BooleanFilter()
bits
public java.util.BitSet bits(IndexReader reader)
throws java.io.IOException
- Returns the a BitSet representing the Boolean composition
of the filters that have been added.
- Specified by:
bits
in class Filter
- Throws:
java.io.IOException
add
public void add(FilterClause filterClause)
- Adds a new FilterClause to the Boolean Filter container
- Parameters:
filterClause
- A FilterClause object containing a Filter and an Occur parameter
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.