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.
| Modifier and Type | Field and Description |
|---|---|
private TopTermsRewrite<java.util.List<SpanQuery>> |
delegate |
| Constructor and Description |
|---|
TopTermsSpanBooleanQueryRewrite(int size)
Create a TopTermsSpanBooleanQueryRewrite for
at most
size terms. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getSize()
return the maximum priority queue size
|
int |
hashCode() |
SpanQuery |
rewrite(IndexReader reader,
MultiTermQuery query) |
getTermsEnumprivate final TopTermsRewrite<java.util.List<SpanQuery>> delegate
public TopTermsSpanBooleanQueryRewrite(int size)
size terms.public int getSize()
public SpanQuery rewrite(IndexReader reader, MultiTermQuery query) throws java.io.IOException
rewrite in class SpanMultiTermQueryWrapper.SpanRewriteMethodjava.io.IOExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object