Package org.apache.lucene.search
Class BlendedTermQuery.Builder
- java.lang.Object
-
- org.apache.lucene.search.BlendedTermQuery.Builder
-
- Enclosing class:
- BlendedTermQuery
public static class BlendedTermQuery.Builder extends Object
A Builder forBlendedTermQuery.
-
-
Constructor Summary
Constructors Constructor Description Builder()Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlendedTermQuery.Builderadd(Term term)Add a newTermto this builder, with a default boost of1.BlendedTermQuery.Builderadd(Term term, float boost)Add aTermwith the provided boost.BlendedTermQuery.Builderadd(Term term, float boost, TermStates context)Expert: Add aTermwith the provided boost and context.BlendedTermQuerybuild()Build theBlendedTermQuery.BlendedTermQuery.BuildersetRewriteMethod(BlendedTermQuery.RewriteMethod rewiteMethod)Set theBlendedTermQuery.RewriteMethod.
-
-
-
Method Detail
-
setRewriteMethod
public BlendedTermQuery.Builder setRewriteMethod(BlendedTermQuery.RewriteMethod rewiteMethod)
Set theBlendedTermQuery.RewriteMethod. Default is to useBlendedTermQuery.DISJUNCTION_MAX_REWRITE.- See Also:
BlendedTermQuery.RewriteMethod
-
add
public BlendedTermQuery.Builder add(Term term)
Add a newTermto this builder, with a default boost of1.- See Also:
add(Term, float)
-
add
public BlendedTermQuery.Builder add(Term term, float boost)
Add aTermwith the provided boost. The higher the boost, the more this term will contribute to the overall score of theBlendedTermQuery.
-
add
public BlendedTermQuery.Builder add(Term term, float boost, TermStates context)
Expert: Add aTermwith the provided boost and context. This method is useful if you already have aTermStatesobject constructed for the given term.
-
build
public BlendedTermQuery build()
Build theBlendedTermQuery.
-
-