public class BooleanFilter extends Filter implements java.lang.Iterable<FilterClause>
Constructor and Description |
---|
BooleanFilter() |
Modifier and Type | Method and Description |
---|---|
void |
add(Filter filter,
BooleanClause.Occur occur) |
void |
add(FilterClause filterClause)
Adds a new FilterClause to the Boolean Filter container
|
java.util.List<FilterClause> |
clauses()
Returns the list of clauses
|
boolean |
equals(java.lang.Object obj) |
DocIdSet |
getDocIdSet(IndexReader reader)
Returns the a DocIdSetIterator representing the Boolean composition
of the filters that have been added.
|
int |
hashCode() |
java.util.Iterator<FilterClause> |
iterator()
Returns an iterator on the clauses in this query.
|
java.lang.String |
toString()
Prints a user-readable version of this Filter.
|
public DocIdSet getDocIdSet(IndexReader reader) throws java.io.IOException
getDocIdSet
in class Filter
reader
- 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.java.io.IOException
DocIdBitSet
public void add(FilterClause filterClause)
filterClause
- A FilterClause object containing a Filter and an Occur parameterpublic final void add(Filter filter, BooleanClause.Occur occur)
public java.util.List<FilterClause> clauses()
public final java.util.Iterator<FilterClause> iterator()
Iterable
interface to
make it possible to do:
for (FilterClause clause : booleanFilter) {}
iterator
in interface java.lang.Iterable<FilterClause>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object