<p>According the Joaquín Pérez-Iglesias in <a href="https://arxiv.org/abs/0911.5046" rel="nofollow noreferrer">Integrating the Probabilistic Model BM25/BM25F into Lucene</a>, the score function R should be defined as followed :</p>

<p><img src="https://i.stack.imgur.com/sgOGC.png" alt="enter image description here"></p>

<p>such as</p>

<ul>
<li><code>occurs_t^d</code> is the term frequency of <code>t</code> in <code>d</code>,</li>
<li><code>l_d</code> is the document <code>d</code> length.</li>
<li><code>avl_d</code> is the document average length along the collection</li>
<li><code>k_1</code> is a free parameter usually 2 and <code>b</code> in [0,1] (usually 0.75). </li>
</ul>

<p>Assigning 0 to <code>b</code> is equivalent to avoid the process of normalisation and therefore the document length will not affect the final score. </p>

<p>If <code>b</code> takes 1, we will be carrying out a full length normalisation.</p>

<p><img src="https://i.stack.imgur.com/XEBhE.png" alt="enter image description here"></p>

<p>where <code>N</code> is the number of document in the collection and <code>df</code> is the number of documents where appears the term <code>t</code>.</p>
Average Document Length in Okapi BM25
<p>I am studying the Okapi BMS25 model. I understand everything but two confusion. While calculating document length (dl) and average document length (avdl). I found the document length is </p>

<p><img src="https://i.stack.imgur.com/3UYl4.jpg" alt="enter image description here"></p>

<p>So it is a summation of my keywords/terms in a particular document. But when I see wiki's def:</p>

<p><img src="https://i.stack.imgur.com/Y7gjY.png" alt="enter image description here"></p>

<p>So |D| is the length of the document D in words (i.e. is summation of total words count). 
Now, the question what is dl actually?</p>

<p>Now, second question how to calculate avdl? (just calculating (doc1+doc2+...N)/N where N is my total no documents in collection? (and avdl is fixed for whole collection?)</p>