Package org.apache.lucene.search.spans
Class SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
- java.lang.Object
 - 
- org.apache.lucene.search.MultiTermQuery.RewriteMethod
 - 
- org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
 - 
- org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
 
 
 
 
- 
- Enclosing class:
 - SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
 
public static final class SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite extends SpanMultiTermQueryWrapper.SpanRewriteMethod
A rewrite method that first translates each term into a SpanTermQuery in aBooleanClause.Occur.SHOULDclause 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 Summary
Constructors Constructor Description TopTermsSpanBooleanQueryRewrite(int size)Create a TopTermsSpanBooleanQueryRewrite for at mostsizeterms. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetSize()return the maximum priority queue sizeinthashCode()SpanQueryrewrite(IndexReader reader, MultiTermQuery query) 
 - 
 
- 
- 
Method Detail
- 
getSize
public int getSize()
return the maximum priority queue size 
- 
rewrite
public SpanQuery rewrite(IndexReader reader, MultiTermQuery query) throws java.io.IOException
- Specified by:
 rewritein classSpanMultiTermQueryWrapper.SpanRewriteMethod- Throws:
 java.io.IOException
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -