java.lang.Object | ||
↳ | org.apache.lucene.search.Filter | |
↳ | org.apache.lucene.search.MultiTermQueryWrapperFilter<Q extends org.apache.lucene.search.MultiTermQuery> |
Known Direct Subclasses
|
A wrapper for 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
CONSTANT_SCORE_FILTER_REWRITE
;
this is why it is not abstract.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
query |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Wrap a
MultiTermQuery as a Filter. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Expert: Resets the counting of unique terms.
| |||||||||||
Returns a DocIdSet with documents that should be
permitted in search results.
| |||||||||||
Expert: Return the number of unique terms visited during execution of the filter.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.Filter
| |||||||||||
From class
java.lang.Object
|
Expert: Resets the counting of unique terms. Do this before executing the filter.
Returns a DocIdSet with documents that should be permitted in search results.
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. |
---|
IOException |
---|
Expert: Return the number of unique terms visited during execution of the filter. If there are many of them, you may consider using another filter type or optimize your total term count in index.
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()
.