# Elasticsearch Percolate Query Search Score

**URL:** <https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310>\
**Category:** Elasticsearch\
**Created:** [September 19, 2019, 8:46pm UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310 "2019-09-19T20:46:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![niketpatel2525](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niketpatel2525/32/95263_2.png) [@niketpatel2525](https://discuss.elastic.co/u/niketpatel2525)\
**Post date:** [September 19, 2019, 8:46pm UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310/1 "2019-09-19T20:46:12Z")

</div>

How to interpret score value return from the percolate query search?

What is the difference between score received on single document search vs multiple document search on percolate index?

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [September 27, 2019, 9:13am UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310/2 "2019-09-27T09:13:25Z")

</div>

The returned \_score is based on how well the returned percolator query matched with  
the documents provided in the `percolate` query.

Internally the `percolate` query creates a temporary inverted index in memory for  
the documents provided in the `percolate` query. The statistics from this index  
are used to compute the scores.

---

<div class="post-metadata">

**Author:** ![niketpatel2525](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niketpatel2525/32/95263_2.png) [@niketpatel2525](https://discuss.elastic.co/u/niketpatel2525)\
**Post date:** [September 27, 2019, 5:50pm UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310/3 "2019-09-27T17:50:13Z")

</div>

Thanks @mvg for the reply.

I am trying to to match 10,000 records to percolate query and response gives me composite score.

So how should I calculate individual score for each document from the response.

P.S. I don't want to hit elasticsearch for each record.

Thanks

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [September 30, 2019, 7:00am UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310/4 "2019-09-30T07:00:17Z")

</div>

Hi @niketpatel2525,

What you could is use the msearch api and in the msearch request  
embed a search request for each document you like to percolate.  
Then each msearch response item gives the \_score for just that document.

I hope this helps.

Martijn

---

<div class="post-metadata">

**Author:** ![niketpatel2525](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niketpatel2525/32/95263_2.png) [@niketpatel2525](https://discuss.elastic.co/u/niketpatel2525)\
**Post date:** [September 30, 2019, 5:29pm UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310/5 "2019-09-30T17:29:35Z")

</div>

Thanks @mvg. This solution worked for me.

---

<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:** [October 28, 2019, 5:29pm UTC](https://discuss.elastic.co/t/elasticsearch-percolate-query-search-score/200310/6 "2019-10-28T17:29:39Z")

</div>

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