Class RankEvalRequest.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.core.RankEvalRequest.Builder
-
- All Implemented Interfaces:
ObjectBuilder<RankEvalRequest>
- Enclosing class:
- RankEvalRequest
public static class RankEvalRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<RankEvalRequest>
Builder forRankEvalRequest
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RankEvalRequest.Builder
allowNoIndices(java.lang.Boolean value)
If false, 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(java.util.List<ExpandWildcard> list)
Whether to expand wildcard expression to concrete indices that are open, closed or both.RankEvalRequest.Builder
expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Whether to expand wildcard expression to concrete indices that are open, closed or both.RankEvalRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
If true, 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(java.util.function.Function<RankEvalMetric.Builder,ObjectBuilder<RankEvalMetric>> fn)
Definition of the evaluation metric to calculateRankEvalRequest.Builder
metric(RankEvalMetric value)
Definition of the evaluation metric to calculateRankEvalRequest.Builder
requests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)
Required - A set of typical search requests, together with their provided ratingsRankEvalRequest.Builder
requests(java.util.List<RankEvalRequestItem> list)
Required - A set of typical search requests, together with their provided ratingsRankEvalRequest.Builder
requests(RankEvalRequestItem value, RankEvalRequestItem... values)
Required - A set of typical search requests, together with their provided ratingsRankEvalRequest.Builder
searchType(java.lang.String value)
Search operation type-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
allowNoIndices
public final RankEvalRequest.Builder allowNoIndices(@Nullable java.lang.Boolean value)
If false, 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 targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.API name:
allow_no_indices
-
expandWildcards
public final RankEvalRequest.Builder expandWildcards(java.util.List<ExpandWildcard> list)
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
.
-
ignoreUnavailable
public final RankEvalRequest.Builder ignoreUnavailable(@Nullable java.lang.Boolean value)
If true, missing or closed indices are not included in the response.API name:
ignore_unavailable
-
index
public final 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. 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
public final 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. 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
public final RankEvalRequest.Builder metric(@Nullable RankEvalMetric value)
Definition of the evaluation metric to calculateAPI name:
metric
-
metric
public final RankEvalRequest.Builder metric(java.util.function.Function<RankEvalMetric.Builder,ObjectBuilder<RankEvalMetric>> fn)
Definition of the evaluation metric to calculateAPI name:
metric
-
requests
public final RankEvalRequest.Builder requests(java.util.List<RankEvalRequestItem> list)
Required - A set of typical search requests, together with their provided ratingsAPI 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 ratingsAPI 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 ratingsAPI name:
requests
Adds a value to
requests
using a builder lambda.
-
searchType
public final RankEvalRequest.Builder searchType(@Nullable java.lang.String value)
Search operation typeAPI name:
search_type
-
build
public RankEvalRequest build()
Builds aRankEvalRequest
.- Specified by:
build
in interfaceObjectBuilder<RankEvalRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-
-