# BM25 for query itself

**URL:** <https://discuss.elastic.co/t/bm25-for-query-itself/23241>\
**Category:** Elasticsearch\
**Created:** [April 15, 2015, 1:13am UTC](https://discuss.elastic.co/t/bm25-for-query-itself/23241 "2015-04-15T01:13:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bohdan](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@bohdan](https://discuss.elastic.co/u/bohdan)\
**Post date:** [April 15, 2015, 1:13am UTC](https://discuss.elastic.co/t/bm25-for-query-itself/23241/1 "2015-04-15T01:13:58Z")

</div>

Hi,

I'm wondering is there away to calculate BM25 score for the query itself  
(query-against-query)?  
Adding it to index seems to be invalid solution as it will influent the  
tf-idf of the index and make it corrupted.

Thank you,  
Bohdan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2183d2cc-a997-4397-aa0b-c5ac2fcedd71%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2183d2cc-a997-4397-aa0b-c5ac2fcedd71%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [April 15, 2015, 6:54am UTC](https://discuss.elastic.co/t/bm25-for-query-itself/23241/2 "2015-04-15T06:54:06Z")

</div>

Isn't the point of BM25 to use variable document length normalization? It  
works when used on the entire index/corpus. It is meant to influence the TF  
values.

Comparing results between Lucene queries is not advisable. Why did you  
switch to BM25? Do you field lengths vary much?

Cheers,

Ivan  
On Apr 15, 2015 3:14 AM, "bohdan" [bklepar@gmail.com](mailto:bklepar@gmail.com) wrote:

> Hi,
> 
> I'm wondering is there away to calculate BM25 score for the query itself  
> (query-against-query)?  
> Adding it to index seems to be invalid solution as it will influent the  
> tf-idf of the index and make it corrupted.
> 
> Thank you,  
> Bohdan
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/2183d2cc-a997-4397-aa0b-c5ac2fcedd71%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2183d2cc-a997-4397-aa0b-c5ac2fcedd71%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/2183d2cc-a997-4397-aa0b-c5ac2fcedd71%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2183d2cc-a997-4397-aa0b-c5ac2fcedd71%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBkoZPJa%2Ba6urcjHtP3xeYHHP5Jb39cFFXPLS09PACuPQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBkoZPJa%2Ba6urcjHtP3xeYHHP5Jb39cFFXPLS09PACuPQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:19am UTC](https://discuss.elastic.co/t/bm25-for-query-itself/23241/3 "2017-07-06T00:19:44Z")

</div>


