Package org.apache.lucene.search
Class BlendedTermQuery.Builder
java.lang.Object
org.apache.lucene.search.BlendedTermQuery.Builder
- Enclosing class:
- BlendedTermQuery
A Builder for
BlendedTermQuery
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a newTerm
to this builder, with a default boost of1
.Add aTerm
with the provided boost.add
(Term term, float boost, TermStates context) Expert: Add aTerm
with the provided boost and context.build()
Build theBlendedTermQuery
.setRewriteMethod
(BlendedTermQuery.RewriteMethod rewiteMethod) Set theBlendedTermQuery.RewriteMethod
.
-
Constructor Details
-
Builder
public Builder()Sole constructor.
-
-
Method Details
-
setRewriteMethod
Set theBlendedTermQuery.RewriteMethod
. Default is to useBlendedTermQuery.DISJUNCTION_MAX_REWRITE
.- See Also:
-
add
Add a newTerm
to this builder, with a default boost of1
.- See Also:
-
add
Add aTerm
with the provided boost. The higher the boost, the more this term will contribute to the overall score of theBlendedTermQuery
. -
add
Expert: Add aTerm
with the provided boost and context. This method is useful if you already have aTermStates
object constructed for the given term. -
build
Build theBlendedTermQuery
.
-