|
|||||||||
| 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<Q>
public class MultiTermQueryWrapperFilter<Q extends MultiTermQuery>
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 Q |
query
|
| Constructor Summary | |
|---|---|
protected |
MultiTermQueryWrapperFilter(Q query)
Wrap a MultiTermQuery as a Filter. |
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
DocIdSet |
getDocIdSet(AtomicReaderContext context,
Bits acceptDocs)
Returns a DocIdSet with documents that should be permitted in search results. |
String |
getField()
Returns the field name for this query |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Q extends MultiTermQuery query
| Constructor Detail |
|---|
protected MultiTermQueryWrapperFilter(Q 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 final String getField()
public DocIdSet getDocIdSet(AtomicReaderContext context,
Bits acceptDocs)
throws IOException
getDocIdSet in class Filtercontext - a AtomicReaderContext instance opened on the index currently
searched on. Note, it is likely that the provided reader info 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.
The provided context is always an atomic context, so you can call
AtomicReader.fields()
on the context's reader, for example.acceptDocs - Bits that represent the allowable docs to match (typically deleted docs
but possibly filtering other documents)
null should be returned if
the filter doesn't accept any documents otherwise internal optimization might not apply
in the case an empty DocIdSet is returned.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||