# How to customize relevance scoring formula?

**URL:** <https://discuss.elastic.co/t/how-to-customize-relevance-scoring-formula/1301>\
**Category:** Elasticsearch\
**Created:** [May 26, 2015, 10:37am UTC](https://discuss.elastic.co/t/how-to-customize-relevance-scoring-formula/1301 "2015-05-26T10:37:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_C\_S\_Yeh](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@Daniel\_C\_S\_Yeh](https://discuss.elastic.co/u/Daniel_C_S_Yeh)\
**Post date:** [May 26, 2015, 10:37am UTC](https://discuss.elastic.co/t/how-to-customize-relevance-scoring-formula/1301/1 "2015-05-26T10:37:22Z")

</div>

As I know, the default one is tf-idf. Also, elasticsearch also provides other scoring choice, like BM25. But if I want to use the default td-idf result and multiplicate one specific field in the index. How can I do it?

Many thanks

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [May 26, 2015, 11:24am UTC](https://discuss.elastic.co/t/how-to-customize-relevance-scoring-formula/1301/2 "2015-05-26T11:24:43Z")

</div>

perhaps you need to have a mappping [https://www.elastic.co/guide/en/elasticsearch/guide/master/changing-similarities.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/changing-similarities.html) and [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html) with score mode to multiply. this is just a hunch on what you are trying to do, you need to try it out.

hth

jason

---

<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 6, 2017, 12:11am UTC](https://discuss.elastic.co/t/how-to-customize-relevance-scoring-formula/1301/3 "2017-07-06T00:11:52Z")

</div>


