# Controlling b and k1 values on the BM25 of the unified highlighter

**URL:** <https://discuss.elastic.co/t/controlling-b-and-k1-values-on-the-bm25-of-the-unified-highlighter/110935>\
**Category:** Elasticsearch\
**Created:** [December 9, 2017, 3:41pm UTC](https://discuss.elastic.co/t/controlling-b-and-k1-values-on-the-bm25-of-the-unified-highlighter/110935 "2017-12-09T15:41:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheker](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Sheker](https://discuss.elastic.co/u/Sheker)\
**Post date:** [December 9, 2017, 3:41pm UTC](https://discuss.elastic.co/t/controlling-b-and-k1-values-on-the-bm25-of-the-unified-highlighter/110935/1 "2017-12-09T15:41:23Z")

</div>

Hi,

The reference states:

"The `unified` highlighter uses the Lucene Unified Highlighter. This highlighter breaks the text into sentences and uses the BM25 algorithm to score individual sentences as if they were documents in the corpus."

Is it possible to control the b and k1 values for this BM25 algorithm separately from the values I use for searching?

Specifically I don't want sentence length to be accounted for in scoring highlights.

Thanks

---

<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:** [December 9, 2017, 4:18pm UTC](https://discuss.elastic.co/t/controlling-b-and-k1-values-on-the-bm25-of-the-unified-highlighter/110935/2 "2017-12-09T16:18:56Z")

</div>

Not sure it answered but did you see: [https://www.elastic.co/guide/en/elasticsearch/reference/6.0/index-modules-similarity.html#\_available\_similarities](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/index-modules-similarity.html#_available_similarities) ?

---

<div class="post-metadata">

**Author:** ![Sheker](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Sheker](https://discuss.elastic.co/u/Sheker)\
**Post date:** [December 9, 2017, 8:04pm UTC](https://discuss.elastic.co/t/controlling-b-and-k1-values-on-the-bm25-of-the-unified-highlighter/110935/3 "2017-12-09T20:04:35Z")

</div>

Hi, it doesn't answer my question.  
That page is about the similarity used to score documents. What I am looking for is how to configure the similarity used to score highlighting.

---

<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:** [January 6, 2018, 8:04pm UTC](https://discuss.elastic.co/t/controlling-b-and-k1-values-on-the-bm25-of-the-unified-highlighter/110935/4 "2018-01-06T20:04:49Z")

</div>

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