Class FunctionScoreQuery.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder<FunctionScoreQuery.Builder>
-
- org.opensearch.client.opensearch._types.query_dsl.FunctionScoreQuery.Builder
-
- All Implemented Interfaces:
ObjectBuilder<FunctionScoreQuery>
- Enclosing class:
- FunctionScoreQuery
public static class FunctionScoreQuery.Builder extends QueryBase.AbstractBuilder<FunctionScoreQuery.Builder> implements ObjectBuilder<FunctionScoreQuery>
Builder forFunctionScoreQuery
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
Methods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryName
-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
boostMode
public final FunctionScoreQuery.Builder boostMode(@Nullable FunctionBoostMode value)
API name:boost_mode
-
functions
public final FunctionScoreQuery.Builder functions(java.util.List<FunctionScore> list)
API name:functions
Adds all elements of
list
tofunctions
.
-
functions
public final FunctionScoreQuery.Builder functions(FunctionScore value, FunctionScore... values)
API name:functions
Adds one or more values to
functions
.
-
functions
public final FunctionScoreQuery.Builder functions(java.util.function.Function<FunctionScore.Builder,ObjectBuilder<FunctionScore>> fn)
API name:functions
Adds a value to
functions
using a builder lambda.
-
maxBoost
public final FunctionScoreQuery.Builder maxBoost(@Nullable java.lang.Double value)
API name:max_boost
-
minScore
public final FunctionScoreQuery.Builder minScore(@Nullable java.lang.Double value)
API name:min_score
-
query
public final FunctionScoreQuery.Builder query(@Nullable Query value)
API name:query
-
query
public final FunctionScoreQuery.Builder query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
API name:query
-
scoreMode
public final FunctionScoreQuery.Builder scoreMode(@Nullable FunctionScoreMode value)
API name:score_mode
-
self
protected FunctionScoreQuery.Builder self()
- Specified by:
self
in classQueryBase.AbstractBuilder<FunctionScoreQuery.Builder>
-
build
public FunctionScoreQuery build()
Builds aFunctionScoreQuery
.- Specified by:
build
in interfaceObjectBuilder<FunctionScoreQuery>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-
-