Class RankEvalRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.RankEvalRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<RankEvalRequest>
- Enclosing class:
- RankEvalRequest
public static class RankEvalRequest.Builder extends java.lang.Object implements ObjectBuilder<RankEvalRequest>
Builder for
RankEvalRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description RankEvalRequest.Builder
addExpandWildcards(ExpandWildcardOptions value)
Add a value toexpandWildcards(List)
, creating the list if needed.RankEvalRequest.Builder
addIndex(java.lang.String value)
Add a value toindex(List)
, creating the list if needed.RankEvalRequest.Builder
addRequests(RankEvalRequestItem value)
Add a value torequests(List)
, creating the list if needed.RankEvalRequest.Builder
addRequests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)
Add a value torequests(List)
, creating the list if needed.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(ExpandWildcardOptions... value)
Whether to expand wildcard expression to concrete indices that are open, closed or both.RankEvalRequest.Builder
expandWildcards(java.util.List<ExpandWildcardOptions> value)
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)
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> value)
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 calculateRankEvalRequest.Builder
metric(java.util.function.Function<RankEvalMetric.Builder,ObjectBuilder<RankEvalMetric>> fn)
Definition of the evaluation metric to calculateRankEvalRequest.Builder
requests(RankEvalRequestItem... value)
Required - A set of typical search requests, together with their provided ratingsRankEvalRequest.Builder
requests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)
Setrequests(List)
to a singleton list.RankEvalRequest.Builder
requests(java.util.List<RankEvalRequestItem> value)
Required - A set of typical search requests, together with their provided ratingsRankEvalRequest.Builder
searchType(java.lang.String value)
Search operation typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
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
-
addIndex
Add a value toindex(List)
, creating the list if needed. -
allowNoIndices
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 RankEvalRequest.Builder expandWildcards(@Nullable java.util.List<ExpandWildcardOptions> value)Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
addExpandWildcards
Add a value toexpandWildcards(List)
, creating the list if needed. -
searchType
Search operation typeAPI name:
search_type
-
requests
Required - A set of typical search requests, together with their provided ratingsAPI name:
requests
-
requests
Required - A set of typical search requests, together with their provided ratingsAPI name:
requests
-
addRequests
Add a value torequests(List)
, creating the list if needed. -
requests
public RankEvalRequest.Builder requests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)Setrequests(List)
to a singleton list. -
addRequests
public RankEvalRequest.Builder addRequests(java.util.function.Function<RankEvalRequestItem.Builder,ObjectBuilder<RankEvalRequestItem>> fn)Add a value torequests(List)
, creating the list if needed. -
metric
Definition of the evaluation metric to calculateAPI name:
metric
-
metric
public RankEvalRequest.Builder metric(java.util.function.Function<RankEvalMetric.Builder,ObjectBuilder<RankEvalMetric>> fn)Definition of the evaluation metric to calculateAPI name:
metric
-
build
Builds aRankEvalRequest
.- Specified by:
build
in interfaceObjectBuilder<RankEvalRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-