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 org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
A span rewrite method that extracts the firstmaxExpansions
terms that match theMultiTermQuery
in the terms dictionary. The rewrite throws an error if more thanmaxExpansions
terms are found andhardLimit
is set.
-
-
Constructor Summary
Constructors Constructor Description SpanBooleanQueryRewriteWithMaxClause()
SpanBooleanQueryRewriteWithMaxClause(int maxExpansions, boolean hardLimit)
-
Method Summary
Modifier and Type Method Description int
getMaxExpansions()
boolean
isHardLimit()
org.apache.lucene.search.spans.SpanQuery
rewrite(org.apache.lucene.index.IndexReader reader, org.apache.lucene.search.MultiTermQuery query)
-
-
-
Method Detail
-
getMaxExpansions
public int getMaxExpansions()
-
isHardLimit
public boolean isHardLimit()
-
rewrite
public org.apache.lucene.search.spans.SpanQuery rewrite(org.apache.lucene.index.IndexReader reader, org.apache.lucene.search.MultiTermQuery query) throws java.io.IOException
- Specified by:
rewrite
in classorg.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
- Throws:
java.io.IOException
-
-