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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a newTermto this builder, with a default boost of1.Add aTermwith the provided boost.add(Term term, float boost, TermStates context) Expert: Add aTermwith 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 newTermto this builder, with a default boost of1.- See Also:
-
add
Add aTermwith the provided boost. The higher the boost, the more this term will contribute to the overall score of theBlendedTermQuery. -
add
Expert: Add aTermwith the provided boost and context. This method is useful if you already have aTermStatesobject constructed for the given term. -
build
Build theBlendedTermQuery.
-