public class MultiTermQueryWrapperFilter<Q extends MultiTermQuery> extends Filter
MultiTermQuery, that exposes its
functionality as a Filter.
MultiTermQueryWrapperFilter is not designed to
be used by itself. Normally you subclass it to provide a Filter
counterpart for a MultiTermQuery subclass.
For example, TermRangeFilter and PrefixFilter extend
MultiTermQueryWrapperFilter.
This class also provides the functionality behind
MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE;
this is why it is not abstract.
| Modifier | Constructor and Description |
|---|---|
protected |
MultiTermQueryWrapperFilter(Q query)
Wrap a
MultiTermQuery as a Filter. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearTotalNumberOfTerms()
Deprecated.
Don't use this method, as its not thread safe and useless.
|
boolean |
equals(Object o) |
DocIdSet |
getDocIdSet(IndexReader reader)
Returns a DocIdSet with documents that should be
permitted in search results.
|
int |
getTotalNumberOfTerms()
Deprecated.
Don't use this method, as its not thread safe and useless.
|
int |
hashCode() |
String |
toString() |
protected final Q extends MultiTermQuery query
protected MultiTermQueryWrapperFilter(Q query)
MultiTermQuery as a Filter.@Deprecated public int getTotalNumberOfTerms()
This method is not thread safe, be sure to only call it when no filter is running!
If you re-use the same filter instance for another
search, be sure to first reset the term counter
with clearTotalNumberOfTerms().
clearTotalNumberOfTerms()@Deprecated public void clearTotalNumberOfTerms()
getTotalNumberOfTerms()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.IOExceptionDocIdBitSet