Class SpanMultiTermQueryWrapper.FrequentTermsSpanBooleanQueryRewrite

java.lang.Object
org.apache.lucene.search.MultiTermQuery.RewriteMethod
org.apache.lucene.queries.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
org.apache.lucene.queries.spans.SpanMultiTermQueryWrapper.FrequentTermsSpanBooleanQueryRewrite
Enclosing class:
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>

public static final class SpanMultiTermQueryWrapper.FrequentTermsSpanBooleanQueryRewrite extends SpanMultiTermQueryWrapper.SpanRewriteMethod
A rewrite method that translates each term into a SpanTermQuery within a SpanOrQuery, but retains only the most frequent terms so it will not overflow the boolean max clause count.

Unlike SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite, which keeps the top terms by boost, this method ranks terms by their index statistics — document frequency, optionally breaking ties by total term frequency — and keeps the maxSize most frequent ones.

See Also: