|
||||||||||
| 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.MultiTermQueryWrapperFilter
public class MultiTermQueryWrapperFilter
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
MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE;
this is why it is not abstract.
| Field Summary | |
|---|---|
protected MultiTermQuery |
query
|
| Constructor Summary | |
|---|---|
protected |
MultiTermQueryWrapperFilter(MultiTermQuery query)
Wrap a MultiTermQuery as a Filter. |
| Method Summary | |
|---|---|
BitSet |
bits(IndexReader reader)
Deprecated. Use getDocIdSet(IndexReader) instead. |
void |
clearTotalNumberOfTerms()
Expert: Resets the counting of unique terms. |
boolean |
equals(Object o)
|
DocIdSet |
getDocIdSet(IndexReader reader)
Returns a DocIdSet with documents that should be permitted in search results. |
int |
getTotalNumberOfTerms()
Expert: Return the number of unique terms visited during execution of the filter. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final MultiTermQuery query
| Constructor Detail |
|---|
protected MultiTermQueryWrapperFilter(MultiTermQuery query)
MultiTermQuery as a Filter.
| Method Detail |
|---|
public String toString()
toString in class Objectpublic final boolean equals(Object o)
equals in class Objectpublic final int hashCode()
hashCode in class Objectpublic 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()public void clearTotalNumberOfTerms()
getTotalNumberOfTerms()
public BitSet bits(IndexReader reader)
throws IOException
getDocIdSet(IndexReader) instead.
bits in class FilterNOTE: See Filter.getDocIdSet(IndexReader) for
handling of multi-segment indexes (which applies to
this method as well).
IOException
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||