org.elasticsearch.common.io.stream.NamedWriteable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.io.stream.WriteableDiscountedCumulativeGain, MeanReciprocalRank, PrecisionAtKpublic interface EvaluationMetric
extends org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.io.stream.NamedWriteable
EvaluationMetric need to provide a way to compute the quality metric for
a result list returned by some search (@link SearchHits) and a list of rated documents.| Modifier and Type | Method | Description |
|---|---|---|
default double |
combine(java.util.Collection<EvalQueryQuality> partialResults) |
how evaluation metrics for particular search queries get combined for the overall evaluation score.
|
EvalQueryQuality |
evaluate(java.lang.String taskId,
org.elasticsearch.search.SearchHit[] hits,
java.util.List<RatedDocument> ratedDocs) |
Returns a single metric representing the ranking quality of a set of returned
documents wrt.
|
static java.util.List<org.elasticsearch.index.rankeval.RatedDocument.DocumentKey> |
filterUnknownDocuments(java.util.List<RatedSearchHit> ratedHits) |
filter @link
RatedSearchHit that don't have a rating |
default java.util.Optional<java.lang.Integer> |
forcedSearchSize() |
Metrics can define a size of the search hits windows they want to retrieve by overwriting
this method.
|
static java.util.List<RatedSearchHit> |
joinHitsWithRatings(org.elasticsearch.search.SearchHit[] hits,
java.util.List<RatedDocument> ratedDocs) |
join hits with rated documents using the joint _index/_id document key
|
EvalQueryQuality evaluate(java.lang.String taskId, org.elasticsearch.search.SearchHit[] hits, java.util.List<RatedDocument> ratedDocs)
taskId - the id of the query for which the ranking is currently evaluatedhits - the result hits as returned by a search requestratedDocs - the documents that were ranked by human annotators for this query
casestatic java.util.List<RatedSearchHit> joinHitsWithRatings(org.elasticsearch.search.SearchHit[] hits, java.util.List<RatedDocument> ratedDocs)
static java.util.List<org.elasticsearch.index.rankeval.RatedDocument.DocumentKey> filterUnknownDocuments(java.util.List<RatedSearchHit> ratedHits)
RatedSearchHit that don't have a ratingdefault double combine(java.util.Collection<EvalQueryQuality> partialResults)
default java.util.Optional<java.lang.Integer> forcedSearchSize()