|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.search.Filter
org.apache.lucene.search.BooleanFilter
public class BooleanFilter
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
| Constructor Summary | |
|---|---|
BooleanFilter()
|
|
| Method Summary | |
|---|---|
void |
add(Filter filter,
BooleanClause.Occur occur)
|
void |
add(FilterClause filterClause)
Adds a new FilterClause to the Boolean Filter container |
List<FilterClause> |
clauses()
Returns the list of clauses |
boolean |
equals(Object obj)
|
DocIdSet |
getDocIdSet(IndexReader reader)
Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added. |
int |
hashCode()
|
Iterator<FilterClause> |
iterator()
Returns an iterator on the clauses in this query. |
String |
toString()
Prints a user-readable version of this Filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BooleanFilter()
| Method Detail |
|---|
public DocIdSet getDocIdSet(IndexReader reader)
throws IOException
getDocIdSet in class Filterreader - a IndexReader instance opened on the index currently
searched on. Note, it is likely that the provided reader does not
represent the whole underlying index i.e. if the index has more than
one segment the given reader only represents a single segment.
IOExceptionDocIdBitSetpublic void add(FilterClause filterClause)
filterClause - A FilterClause object containing a Filter and an Occur parameter
public final void add(Filter filter,
BooleanClause.Occur occur)
public List<FilterClause> clauses()
public final Iterator<FilterClause> iterator()
Iterable interface to
make it possible to do:
for (FilterClause clause : booleanFilter) {}
iterator in interface Iterable<FilterClause>public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||