public static class BlendedTermQuery.Builder extends Object
BlendedTermQuery
.Constructor and Description |
---|
Builder()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
BlendedTermQuery.Builder |
add(Term term)
Add a new
Term to this builder, with a default boost of 1 . |
BlendedTermQuery.Builder |
add(Term term,
float boost)
Add a
Term with the provided boost. |
BlendedTermQuery.Builder |
add(Term term,
float boost,
TermStates context)
Expert: Add a
Term with the provided boost and context. |
BlendedTermQuery |
build()
Build the
BlendedTermQuery . |
BlendedTermQuery.Builder |
setRewriteMethod(BlendedTermQuery.RewriteMethod rewiteMethod)
Set the
BlendedTermQuery.RewriteMethod . |
public BlendedTermQuery.Builder setRewriteMethod(BlendedTermQuery.RewriteMethod rewiteMethod)
BlendedTermQuery.RewriteMethod
. Default is to use
BlendedTermQuery.DISJUNCTION_MAX_REWRITE
.BlendedTermQuery.RewriteMethod
public BlendedTermQuery.Builder add(Term term)
Term
to this builder, with a default boost of 1
.add(Term, float)
public BlendedTermQuery.Builder add(Term term, float boost)
Term
with the provided boost. The higher the boost, the
more this term will contribute to the overall score of the
BlendedTermQuery
.public BlendedTermQuery.Builder add(Term term, float boost, TermStates context)
Term
with the provided boost and context.
This method is useful if you already have a TermStates
object constructed for the given term.public BlendedTermQuery build()
BlendedTermQuery
.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.