Class RankEvalMetricDetail.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.core.rank_eval.RankEvalMetricDetail.Builder
All Implemented Interfaces:
ObjectBuilder<RankEvalMetricDetail>
Enclosing class:
RankEvalMetricDetail

public static class RankEvalMetricDetail.Builder
extends ObjectBuilderBase
implements ObjectBuilder<RankEvalMetricDetail>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • metricScore

      public final RankEvalMetricDetail.Builder metricScore​(double value)
      Required - The metric_score in the details section shows the contribution of this query to the global quality metric score

      API name: metric_score

    • unratedDocs

      public final RankEvalMetricDetail.Builder unratedDocs​(java.util.List<UnratedDocument> list)
      Required - The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents

      API name: unrated_docs

      Adds all elements of list to unratedDocs.

    • unratedDocs

      public final RankEvalMetricDetail.Builder unratedDocs​(UnratedDocument value, UnratedDocument... values)
      Required - The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents

      API name: unrated_docs

      Adds one or more values to unratedDocs.

    • unratedDocs

      public final RankEvalMetricDetail.Builder unratedDocs​(java.util.function.Function<UnratedDocument.Builder,​ObjectBuilder<UnratedDocument>> fn)
      Required - The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents

      API name: unrated_docs

      Adds a value to unratedDocs using a builder lambda.

    • hits

      public final RankEvalMetricDetail.Builder hits​(java.util.List<RankEvalHitItem> list)
      Required - The hits section shows a grouping of the search results with their supplied ratings

      API name: hits

      Adds all elements of list to hits.

    • hits

      public final RankEvalMetricDetail.Builder hits​(RankEvalHitItem value, RankEvalHitItem... values)
      Required - The hits section shows a grouping of the search results with their supplied ratings

      API name: hits

      Adds one or more values to hits.

    • hits

      public final RankEvalMetricDetail.Builder hits​(java.util.function.Function<RankEvalHitItem.Builder,​ObjectBuilder<RankEvalHitItem>> fn)
      Required - The hits section shows a grouping of the search results with their supplied ratings

      API name: hits

      Adds a value to hits using a builder lambda.

    • metricDetails

      public final RankEvalMetricDetail.Builder metricDetails​(java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​JsonData>> map)
      Required - The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results

      API name: metric_details

      Adds all entries of map to metricDetails.

    • metricDetails

      public final RankEvalMetricDetail.Builder metricDetails​(java.lang.String key, java.util.Map<java.lang.String,​JsonData> value)
      Required - The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results

      API name: metric_details

      Adds an entry to metricDetails.

    • build

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