Class RankEvalRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<RankEvalRequest.Builder>
co.elastic.clients.elasticsearch.core.RankEvalRequest.Builder
- All Implemented Interfaces:
WithJson<RankEvalRequest.Builder>
,ObjectBuilder<RankEvalRequest>
- Enclosing class:
- RankEvalRequest
public static class RankEvalRequest.Builder extends WithJsonObjectBuilderBase<RankEvalRequest.Builder> implements ObjectBuilder<RankEvalRequest>
Builder for
RankEvalRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description RankEvalRequest.Builder
allowNoIndices(java.lang.Boolean value)
Iffalse
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices.RankEvalRequest
build()
Builds aRankEvalRequest
.RankEvalRequest.Builder
expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Whether to expand wildcard expression to concrete indices that are open, closed or both.RankEvalRequest.Builder
expandWildcards(java.util.List<ExpandWildcard> list)
Whether to expand wildcard expression to concrete indices that are open, closed or both.RankEvalRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
Iftrue
, missing or closed indices are not included in the response.RankEvalRequest.Builder
index(java.lang.String value, java.lang.String... values)
Required - Comma-separated list of data streams, indices, and index aliases used to limit the request.RankEvalRequest.Builder
index(java.util.List<java.lang.String> list)
Required - Comma-separated list of data streams, indices, and index aliases used to limit the request.RankEvalRequest.Builder
metric(RankEvalMetric value)
Definition of the evaluation metric to calculate.RankEvalRequest.Builder
metric(java.util.function.Function<RankEvalMetric.Builder,ObjectBuilder<RankEvalMetric>> fn)
Definition of the evaluation metric to calculate.RankEvalRequest.Builder
requests(RankEvalRequestItem value, RankEvalRequestItem... values)
Required - A set of typical search requests, together with their provided ratings.RankEvalRequest.Builder
requests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)
Required - A set of typical search requests, together with their provided ratings.RankEvalRequest.Builder
requests(java.util.List<RankEvalRequestItem> list)
Required - A set of typical search requests, together with their provided ratings.RankEvalRequest.Builder
searchType(java.lang.String value)
Search operation typeprotected RankEvalRequest.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowNoIndices
Iffalse
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
.API name:
allow_no_indices
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
Adds all elements of
list
toexpandWildcards
. -
expandWildcards
public final RankEvalRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
Adds one or more values to
expandWildcards
. -
index
Required - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (*
) expressions are supported. To target all data streams and indices in a cluster, omit this parameter or use_all
or*
.API name:
index
Adds all elements of
list
toindex
. -
index
Required - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (*
) expressions are supported. To target all data streams and indices in a cluster, omit this parameter or use_all
or*
.API name:
index
Adds one or more values to
index
. -
metric
Definition of the evaluation metric to calculate.API name:
metric
-
metric
public final RankEvalRequest.Builder metric(java.util.function.Function<RankEvalMetric.Builder,ObjectBuilder<RankEvalMetric>> fn)Definition of the evaluation metric to calculate.API name:
metric
-
requests
Required - A set of typical search requests, together with their provided ratings.API name:
requests
Adds all elements of
list
torequests
. -
requests
public final RankEvalRequest.Builder requests(RankEvalRequestItem value, RankEvalRequestItem... values)Required - A set of typical search requests, together with their provided ratings.API name:
requests
Adds one or more values to
requests
. -
requests
public final RankEvalRequest.Builder requests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)Required - A set of typical search requests, together with their provided ratings.API name:
requests
Adds a value to
requests
using a builder lambda. -
searchType
Search operation typeAPI name:
search_type
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<RankEvalRequest.Builder>
-
build
Builds aRankEvalRequest
.- Specified by:
build
in interfaceObjectBuilder<RankEvalRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-