Incorrect averageFieldLength(avgdl, average length of field) and fieldLength (dl, length of field) calculation

I have created new index in Elastic Search 7.3.2 version ( "lucene_version" : "8.1.0") .

With following details:
INDEX created using the below details:
FILTER

"skillset_synonyms_filter": {

"type": "synonym_graph",
"synonyms": [
"c-sharp,c sharp",
".net,mvc,core, asp.net,winservice",
"sql,structured query language,dba,database,backend",
"javascript,js"
]
},
"my_stopword_filter": {
"type": "stop",
"stopwords": [
"a","an","and","are","as","at","be","but","by","for","if","in","into","is","it","no","not","of","on","or",
"such","that","the","their","then","there","these","they","this","to","was","will","with"
]
},
ANALYZER

"analyzer": {

"my_synonym_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"skillset_synonyms_filter",
"my_stopword_filter"
]
}

and also I have added the data into the index like this

1]skills -.NET,MVC,SQL,WEB API
2]skills -.NET,MVC,SQL,WEB API
3]skills -javascript
4]skills-java
5]skills-SQL
6]skills:.NET,.NET MVC,.NET Core,SQL,WEB API
so in this the 1st and 2nd record the skillset is the same.

my query to fetch the record like this:

{
"explain": "true",
"query": {
"bool": {
"must": [
{
"match": {
"skills": "javascript"
}
}
]
}
}
}

So i am getting the correct result set but i am not getting how the tf getting calculated.
Means I am getting the "length of field" (dl)=1 And "average length of field " (avgdl)= 13.666667
which is confusing, So anyone could you please help me with this.

Here is the Details:

  • {
    • "value": 0.8453608,
    • "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
    • "details": [
      • {
        • "value": 2,
        • "description": "termFreq=2.0",
        • "details": }
          , * {
        • "value": 1.2,
        • "description": "k1, term saturation parameter",
        • "details":
          }
          , * {
        • "value": 0.75,
        • "description": "b, length normalization parameter",
        • "details":
          }
          , * {
        • "value": 1,
        • "description": "dl, length of field",
        • "details":
          }
          , * {
        • "value": 13.666667,
        • "description": "avgdl, average length of field",
        • "details":
          }
          ]
          }

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