# Normalizing the score during indexing

**URL:** https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [May 30, 2023, 6:00pm UTC](https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708 "2023-05-30T18:00:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![akhil\_reddy](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@akhil\_reddy](https://discuss.elastic.co/u/akhil_reddy)
#### Post date: [May 30, 2023, 6:00pm UTC](https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708/1 "2023-05-30T18:00:47Z")

</div>

Hi,

Is there a way to normalize the elastic score between 0 and 1. I know it is possible to do it during query time by using script, but I am looking for ways to do it during index time.

Thank you

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [May 31, 2023, 4:35am UTC](https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708/2 "2023-05-31T04:35:03Z")

</div>

No it's not possible.

What's the use case?

---

<div class="post-metadata">

### Author: ![akhil\_reddy](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@akhil\_reddy](https://discuss.elastic.co/u/akhil_reddy)
#### Post date: [May 31, 2023, 11:35am UTC](https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708/3 "2023-05-31T11:35:24Z")

</div>

We have use case to add engagement score which will be present inside the result to the elastic score. The engagement score will be between 0-1. We want the engagement score to make a significant contribution to the overall score. So, if elastic score is some thing like 6 or 7, then engagement's contribution will be relatively low. So, we want to make elastic score also between 0-1 so the overall score will be between 0-2 and both elastic score and engagement score will have equal contribution to it. We want to do this during index time.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [May 31, 2023, 12:08pm UTC](https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708/4 "2023-05-31T12:08:19Z")

</div>

You can't do that at index time. But you can use function score which will let you tune the score as you need.

---

<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: [June 28, 2023, 12:09pm UTC](https://discuss.elastic.co/t/normalizing-the-score-during-indexing/334708/5 "2023-06-28T12:09:17Z")

</div>

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