# How to apply relevance ranking to ES indices?

**URL:** <https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038>\
**Category:** Elasticsearch\
**Created:** [June 17, 2019, 10:18am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038 "2019-06-17T10:18:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pyerunka](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pyerunka](https://discuss.elastic.co/u/pyerunka)\
**Post date:** [June 17, 2019, 10:18am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/1 "2019-06-17T10:18:46Z")

</div>

Hello,

Can anyone guide me use of relevance ranking in elasticsearch. Is there any relevance ranking modules available in ES? And how relevance ranking is used in ES?

Thanks & Regards,  
Priyanka

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2019, 10:21am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/2 "2019-06-17T10:21:29Z")

</div>

What do you mean by relevance ranking exactly?

---

<div class="post-metadata">

**Author:** ![pyerunka](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pyerunka](https://discuss.elastic.co/u/pyerunka)\
**Post date:** [June 17, 2019, 10:35am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/3 "2019-06-17T10:35:46Z")

</div>

Hello @warkolm,

Thanks for your reply!!

Relevance ranking is nothing but when a search is executed, there are various factors that determine which records should be returned as a match. Or we can call it as field weighting.

If we have relevance ranking module for our application, named as NTerms . (NTerms is nothing but number of terms)

For example, in a three-word query, results that match all three words will be ranked above results that match only two, which will be ranked above results that match only one.

Regards,  
Priyanka Yerunkar.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2019, 10:50am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/4 "2019-06-17T10:50:02Z")

</div>

Lucene, and thus Elasticsearch, are built on BM25 if that helps.

---

<div class="post-metadata">

**Author:** ![pyerunka](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pyerunka](https://discuss.elastic.co/u/pyerunka)\
**Post date:** [June 17, 2019, 10:56am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/5 "2019-06-17T10:56:57Z")

</div>

Hello @warkolm,

Thanks for update!!!!  
BM25 is some algorithm to calculate score of results and depending upon that search results will be displayed. And this score is calculated by default when we search in ES indices.

Correct me if I am wrong.

Regards,  
Priyanka

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2019, 10:58am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/6 "2019-06-17T10:58:45Z")

</div>

That is correct.

[https://www.elastic.co/guide/en/elasticsearch/reference/7.1/similarity.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/similarity.html) might be of interest.

---

<div class="post-metadata">

**Author:** ![pyerunka](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pyerunka](https://discuss.elastic.co/u/pyerunka)\
**Post date:** [June 17, 2019, 11:02am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/7 "2019-06-17T11:02:50Z")

</div>

Hello @warkolm,

Thanks for quick update!!  
So apart from this score factor, ES does not have any relevance ranking module?

Regards,  
Priyanka

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2019, 11:07am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/8 "2019-06-17T11:07:18Z")

</div>

There are plugins to do it, but other than what is in the docs no.

---

<div class="post-metadata">

**Author:** ![pyerunka](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pyerunka](https://discuss.elastic.co/u/pyerunka)\
**Post date:** [June 17, 2019, 11:09am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/9 "2019-06-17T11:09:48Z")

</div>

Hello @warkolm,

Could you help me to find out plugins?

Thanks,  
Priyanka

---

<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:** [July 15, 2019, 11:09am UTC](https://discuss.elastic.co/t/how-to-apply-relevance-ranking-to-es-indices/186038/10 "2019-07-15T11:09:49Z")

</div>

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