Skip to content

RankEval doesn't take the requested number of results into consideration #29205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
paweloque opened this issue Mar 22, 2018 · 4 comments
Closed
Assignees
Labels
>docs General docs changes :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v6.3.0 v7.0.0-beta1

Comments

@paweloque
Copy link

RankEval takes page size into consideration:

Currently RankEval only looks at the first 10 results of a query. Even if the number of results is specified, rank eval only requests 10 results and compares them with the expected results.

RankEval should consider the specified 'size' for calculations of the search quality.

@colings86 colings86 added >enhancement :Search Relevance/Ranking Scoring, rescoring, rank evaluation. labels Mar 22, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@colings86
Copy link
Contributor

@cbuescher could you take a look?

@cbuescher
Copy link
Member

cbuescher commented Mar 22, 2018

@paweloque thanks for your question, RankEval currently disregards the "size" parameter specified in queries on purpose. Instead, the maximum number of documents to be retrieved should be specified for all the current metrics in the "metric" section using the "k" parameter (named so because Precision is usually calculated for a window size k, so its named "Precicsion at k" (Prec@k).

The window size should be specified in the metric because this way we can make sure that different queries don't use different "size" values to make the results comparable. I just realized this isn't mentioned in the documentation so far, so thanks for pointing this out. I will add proper usage examples for the "k" parameter to the docs.

For now, you can use e.g.

"metric": {
    "mean_reciprocal_rank": {
      "k" : 20
    }
  }

For a result window of 20.

@cbuescher cbuescher added >docs General docs changes v7.0.0 v6.3.0 and removed >enhancement labels Mar 22, 2018
@paweloque
Copy link
Author

@cbuescher Thanks for your reply and helping me! That perfectly makes sense.

cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Mar 23, 2018
The rank_eval documentation was missing an explanation of the parameter
`k` that controls the number of top hits that are used in the ranking
evaluation.

Closes elastic#29205
cbuescher pushed a commit that referenced this issue Mar 23, 2018
The rank_eval documentation was missing an explanation of the parameter
`k` that controls the number of top hits that are used in the ranking evaluation.

Closes #29205
cbuescher pushed a commit that referenced this issue Mar 23, 2018
The rank_eval documentation was missing an explanation of the parameter
`k` that controls the number of top hits that are used in the ranking evaluation.

Closes #29205
cbuescher pushed a commit that referenced this issue Mar 23, 2018
The rank_eval documentation was missing an explanation of the parameter
`k` that controls the number of top hits that are used in the ranking evaluation.

Closes #29205
@javanna javanna added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v6.3.0 v7.0.0-beta1
Projects
None yet
Development

No branches or pull requests

5 participants