# How to calculate score after filter in Elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-calculate-score-after-filter-in-elasticsearch/341733>\
**Category:** Elasticsearch\
**Created:** [August 26, 2023, 9:13am UTC](https://discuss.elastic.co/t/how-to-calculate-score-after-filter-in-elasticsearch/341733 "2023-08-26T09:13:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![at\_ohn](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@at\_ohn](https://discuss.elastic.co/u/at_ohn)\
**Post date:** [August 26, 2023, 9:13am UTC](https://discuss.elastic.co/t/how-to-calculate-score-after-filter-in-elasticsearch/341733/1 "2023-08-26T09:13:54Z")

</div>

Does anyone know how we can get the score to be calculated AFTER the filter is applied? Rescoring doesn't help too because it still takes into account all documents in the index. I need a score that is independent of the other documents that do not fulfil the filter criteria.

The only way I found that works is to index each filtered result separately, but this is not practical.

Thanks!

---

<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 23, 2023, 9:14am UTC](https://discuss.elastic.co/t/how-to-calculate-score-after-filter-in-elasticsearch/341733/2 "2023-09-23T09:14:26Z")

</div>

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