|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.search.MultiTermQuery.RewriteMethod
org.apache.lucene.search.TopTermsRewrite<Q>
public abstract class TopTermsRewrite<Q extends Query>
Base rewrite method for collecting only the top terms via a priority queue.
| Nested Class Summary | |
|---|---|
protected static interface |
TermCollectingRewrite.TermCollector
|
| Constructor Summary | |
|---|---|
TopTermsRewrite(int size)
Create a TopTermsBooleanQueryRewrite for at most size terms. |
|
| Method Summary | |
|---|---|
protected abstract void |
addClause(Q topLevel,
Term term,
float boost)
Add a MultiTermQuery term to the top-level query |
protected void |
collectTerms(IndexReader reader,
MultiTermQuery query,
TermCollectingRewrite.TermCollector collector)
|
boolean |
equals(Object obj)
|
protected abstract int |
getMaxSize()
return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount). |
int |
getSize()
return the maximum priority queue size |
protected abstract Q |
getTopLevelQuery()
Return a suitable top-level Query for holding all expanded terms. |
int |
hashCode()
|
Q |
rewrite(IndexReader reader,
MultiTermQuery query)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TopTermsRewrite(int size)
size terms.
NOTE: if BooleanQuery.getMaxClauseCount() is smaller than
size, then it will be used instead.
| Method Detail |
|---|
public int getSize()
protected abstract int getMaxSize()
public Q rewrite(IndexReader reader,
MultiTermQuery query)
throws IOException
rewrite in class MultiTermQuery.RewriteMethodIOExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
protected abstract Q getTopLevelQuery()
throws IOException
IOException
protected abstract void addClause(Q topLevel,
Term term,
float boost)
throws IOException
IOException
protected final void collectTerms(IndexReader reader,
MultiTermQuery query,
TermCollectingRewrite.TermCollector collector)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||