public static final class SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite extends SpanMultiTermQueryWrapper.SpanRewriteMethod
BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the
scores as computed by the query.
This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.
| Constructor and Description |
|---|
TopTermsSpanBooleanQueryRewrite(int size)
Create a TopTermsSpanBooleanQueryRewrite for
at most
size terms. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getSize()
return the maximum priority queue size
|
int |
hashCode() |
SpanQuery |
rewrite(IndexReader reader,
MultiTermQuery query) |
getTermsEnumpublic TopTermsSpanBooleanQueryRewrite(int size)
size terms.public int getSize()
public SpanQuery rewrite(IndexReader reader, MultiTermQuery query) throws IOException
rewrite in class SpanMultiTermQueryWrapper.SpanRewriteMethodIOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.