Class RankEvalRequest.Builder

All Implemented Interfaces:
WithJson<RankEvalRequest.Builder>, ObjectBuilder<RankEvalRequest>
Enclosing class:
RankEvalRequest

public static class RankEvalRequest.Builder extends RequestBase.AbstractBuilder<RankEvalRequest.Builder> implements ObjectBuilder<RankEvalRequest>
Builder for RankEvalRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • allowNoIndices

      public final RankEvalRequest.Builder allowNoIndices(@Nullable Boolean value)
      A setting that does two separate checks on the index expression. If false, the request returns an error (1) if any wildcard expression (including _all and *) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. If true, index expressions that resolve to no indices are allowed and the request returns an empty result.

      API name: allow_no_indices

    • expandWildcards

      public final RankEvalRequest.Builder expandWildcards(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 to expandWildcards.

    • 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 Boolean value)
      If false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If true, unavailable concrete targets are silently ignored.

      API name: ignore_unavailable

    • index

      public final RankEvalRequest.Builder index(List<String> list)
      A 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 to index.

    • index

      public final RankEvalRequest.Builder index(String value, String... values)
      A 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 calculate.

      API name: metric

    • metric

      Definition of the evaluation metric to calculate.

      API name: metric

    • requests

      public final RankEvalRequest.Builder requests(List<RankEvalRequestItem> list)
      Required - A set of typical search requests, together with their provided ratings.

      API name: requests

      Adds all elements of list to requests.

    • 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

      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

      public final RankEvalRequest.Builder searchType(@Nullable SearchType value)
      Search operation type

      API name: search_type

    • self

      protected RankEvalRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<RankEvalRequest.Builder>
    • build

      public RankEvalRequest build()
      Builds a RankEvalRequest.
      Specified by:
      build in interface ObjectBuilder<RankEvalRequest>
      Throws:
      NullPointerException - if some of the required fields are null.