Class SpanBooleanQueryRewriteWithMaxClause
- java.lang.Object
-
- org.apache.lucene.search.MultiTermQuery.RewriteMethod
-
- org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
-
- org.elasticsearch.common.lucene.search.SpanBooleanQueryRewriteWithMaxClause
-
public class SpanBooleanQueryRewriteWithMaxClause extends SpanMultiTermQueryWrapper.SpanRewriteMethod
A span rewrite method that extracts the firstmaxExpansionsterms that match theMultiTermQueryin the terms dictionary. The rewrite throws an error if more thanmaxExpansionsterms are found andhardLimitis set.
-
-
Constructor Summary
Constructors Constructor Description SpanBooleanQueryRewriteWithMaxClause()SpanBooleanQueryRewriteWithMaxClause(int maxExpansions, boolean hardLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxExpansions()booleanisHardLimit()SpanQueryrewrite(IndexReader reader, MultiTermQuery query)-
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
-
-
-
-
Method Detail
-
getMaxExpansions
public int getMaxExpansions()
-
isHardLimit
public boolean isHardLimit()
-
rewrite
public SpanQuery rewrite(IndexReader reader, MultiTermQuery query) throws IOException
- Specified by:
rewritein classSpanMultiTermQueryWrapper.SpanRewriteMethod- Throws:
IOException
-
-