# How do I apply the Precision from the Ranking Evaluation API to all ids?

**URL:** <https://discuss.elastic.co/t/how-do-i-apply-the-precision-from-the-ranking-evaluation-api-to-all-ids/282742>\
**Category:** Elasticsearch\
**Created:** [August 29, 2021, 3:36am UTC](https://discuss.elastic.co/t/how-do-i-apply-the-precision-from-the-ranking-evaluation-api-to-all-ids/282742 "2021-08-29T03:36:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Talents](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@Talents](https://discuss.elastic.co/u/Talents)\
**Post date:** [August 29, 2021, 3:36am UTC](https://discuss.elastic.co/t/how-do-i-apply-the-precision-from-the-ranking-evaluation-api-to-all-ids/282742/1 "2021-08-29T03:36:10Z")

</div>

I'm using this page as a reference ([Ranking evaluation API | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html)) and I was just wondering how I'd apply the Precision part to all the ids in my index instead of having to do it 1 by 1? This is the code from the page:

```auto
GET /my-index-000001/_rank_eval
{
  "requests": [
    {
      "id": "JFK query", # How would I match all indexes instead of just 1?
      "request": { "query": { "match_all": {} } },
      "ratings": []
    } ],
  "metric": {
    "precision": {
      "k": 20,
      "relevant_rating_threshold": 1,
      "ignore_unlabeled": false
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 26, 2021, 3:36am UTC](https://discuss.elastic.co/t/how-do-i-apply-the-precision-from-the-ranking-evaluation-api-to-all-ids/282742/2 "2021-09-26T03:36:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
