public class XBooleanFilter extends org.apache.lucene.search.Filter implements Iterable<org.apache.lucene.queries.FilterClause>
BooleanFilter
.
Our own variance mainly differs by the fact that we pass the acceptDocs down to the filters
and don't filter based on them at the end. Our logic is a bit different, and we filter based on that
at the top level filter chain.Constructor and Description |
---|
XBooleanFilter() |
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.lucene.search.Filter filter,
org.apache.lucene.search.BooleanClause.Occur occur) |
void |
add(org.apache.lucene.queries.FilterClause filterClause)
Adds a new FilterClause to the Boolean Filter container
|
List<org.apache.lucene.queries.FilterClause> |
clauses()
Returns the list of clauses
|
boolean |
equals(Object obj) |
org.apache.lucene.search.DocIdSet |
getDocIdSet(org.apache.lucene.index.AtomicReaderContext context,
org.apache.lucene.util.Bits acceptDocs)
Returns the a DocIdSetIterator representing the Boolean composition
of the filters that have been added.
|
int |
hashCode() |
Iterator<org.apache.lucene.queries.FilterClause> |
iterator()
Returns an iterator on the clauses in this query.
|
String |
toString()
Prints a user-readable version of this Filter.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.AtomicReaderContext context, org.apache.lucene.util.Bits acceptDocs) throws IOException
getDocIdSet
in class org.apache.lucene.search.Filter
IOException
public void add(org.apache.lucene.queries.FilterClause filterClause)
filterClause
- A FilterClause object containing a Filter and an Occur parameterpublic final void add(org.apache.lucene.search.Filter filter, org.apache.lucene.search.BooleanClause.Occur occur)
public List<org.apache.lucene.queries.FilterClause> clauses()
public final Iterator<org.apache.lucene.queries.FilterClause> iterator()
Iterable
interface to
make it possible to do:
for (FilterClause clause : booleanFilter) {}
Copyright © 2009–2015. All rights reserved.