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>
Builder for
RankEvalMetricDetail
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description RankEvalMetricDetail
build()
Builds aRankEvalMetricDetail
.RankEvalMetricDetail.Builder
hits(RankEvalHitItem value, RankEvalHitItem... values)
Required - The hits section shows a grouping of the search results with their supplied ratingsRankEvalMetricDetail.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 ratingsRankEvalMetricDetail.Builder
hits(java.util.List<RankEvalHitItem> list)
Required - The hits section shows a grouping of the search results with their supplied ratingsRankEvalMetricDetail.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.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.RankEvalMetricDetail.Builder
metricScore(double value)
Required - The metric_score in the details section shows the contribution of this query to the global quality metric scoreRankEvalMetricDetail.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.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.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.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricScore
Required - The metric_score in the details section shows the contribution of this query to the global quality metric scoreAPI name:
metric_score
-
unratedDocs
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_docs
Adds all elements of
list
tounratedDocs
. -
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_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 documentsAPI name:
unrated_docs
Adds a value to
unratedDocs
using a builder lambda. -
hits
Required - The hits section shows a grouping of the search results with their supplied ratingsAPI name:
hits
Adds all elements of
list
tohits
. -
hits
Required - The hits section shows a grouping of the search results with their supplied ratingsAPI 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 ratingsAPI 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 resultsAPI name:
metric_details
Adds all entries of
map
tometricDetails
. -
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_details
Adds an entry to
metricDetails
. -
build
Builds aRankEvalMetricDetail
.- Specified by:
build
in interfaceObjectBuilder<RankEvalMetricDetail>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-