Class RankEvalMetricDetail.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.core.rank_eval.RankEvalMetricDetail.Builder
-
- All Implemented Interfaces:
ObjectBuilder<RankEvalMetricDetail>
- Enclosing class:
- RankEvalMetricDetail
public static class RankEvalMetricDetail.Builder extends ObjectBuilderBase implements ObjectBuilder<RankEvalMetricDetail>
Builder forRankEvalMetricDetail.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RankEvalMetricDetailbuild()Builds aRankEvalMetricDetail.RankEvalMetricDetail.Builderhits(java.util.function.Function<RankEvalHitItem.Builder,ObjectBuilder<RankEvalHitItem>> fn)Required - The hits section shows a grouping of the search results with their supplied ratingsRankEvalMetricDetail.Builderhits(java.util.List<RankEvalHitItem> list)Required - The hits section shows a grouping of the search results with their supplied ratingsRankEvalMetricDetail.Builderhits(RankEvalHitItem value, RankEvalHitItem... values)Required - The hits section shows a grouping of the search results with their supplied ratingsRankEvalMetricDetail.BuildermetricDetails(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.RankEvalMetricDetail.BuildermetricDetails(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.RankEvalMetricDetail.BuildermetricScore(double value)Required - The metric_score in the details section shows the contribution of this query to the global quality metric scoreRankEvalMetricDetail.BuilderunratedDocs(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.RankEvalMetricDetail.BuilderunratedDocs(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.RankEvalMetricDetail.BuilderunratedDocs(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.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
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 scoreAPI 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 documentsAPI name:
unrated_docsAdds all elements of
listtounratedDocs.
-
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 documentsAPI name:
unrated_docsAdds 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 documentsAPI name:
unrated_docsAdds a value to
unratedDocsusing 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 ratingsAPI name:
hitsAdds all elements of
listtohits.
-
hits
public final RankEvalMetricDetail.Builder hits(RankEvalHitItem value, RankEvalHitItem... values)
Required - The hits section shows a grouping of the search results with their supplied ratingsAPI name:
hitsAdds 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 ratingsAPI name:
hitsAdds a value to
hitsusing 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 resultsAPI name:
metric_detailsAdds all entries of
maptometricDetails.
-
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 resultsAPI name:
metric_detailsAdds an entry to
metricDetails.
-
build
public RankEvalMetricDetail build()
Builds aRankEvalMetricDetail.- Specified by:
buildin interfaceObjectBuilder<RankEvalMetricDetail>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-