{
"value": 225.99316,
"description": "sum of:",-----得分求和------第一部分+第二部分=225.99316+0
"details": [
-----------第一部分---------
{
"value": 225.99316,
"description": "sum of:",----得分求和----第一部分01+第一部分02+第一部分03= 225.99316+0+0
"details": [
----第一部分01---------------
{
"value": 225.99316,
"description": "sum of:",---得分求和---------第一部分0101+第一部分0102=160.1283+65.86487
"details": [
-------第一部分0101-------160.1283
{
"value": 160.1283,
"description": "sum of:",----得分求和--------第一部分010101+第一部分010102=6.522579+153.60571
"details": [
-----第一部分010101------- 6.522579
{
"value": 6.522579,
"description": "weight(title:螺丝 in 14539) [PerFieldSimilarity], result of:",
"details": [{
"value": 6.522579,
"description": "score(doc=14539,freq=1.0 = termFreq=1.0 ), product of:",
"details": [
{
"value": 6.522579,
-----逆文档频率log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
-----log(1 + (45241 - 66 + 0.5) / (66 + 0.5))=6.522579
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [{
"value": 66,
"description": "docFreq",
"details": []
},
{
"value": 45241,
"description": "docCount",
"details": []
}
]
},
{
"value": 1,
---词频归一化(freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength))
---(1.0 * (0 + 1)) / (1.0 + 0 * (1 - 0.75 + 0.75 * 40.96 / 30.522093))=1
"description": "tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:",
"details": [
{
"value": 1,
"description": "termFreq=1.0",
"details": []
},
{
"value": 0,
"description": "parameter k1",
"details": []
},
{
"value": 0.75,
"description": "parameter b",
"details": []
},
{
"value": 30.522093,
"description": "avgFieldLength",
"details": []
},
{
"value": 40.96,
"description": "fieldLength",
"details": []
}
]
}
]
}]
},
------第一部分010102-------153.60571
{
"value": 153.60571,
"description": "weight(title:"螺丝 螺 丝 " in 14539) [PerFieldSimilarity], result of:",
"details": [{
"value": 153.60571,
---------得分相乘-------10*15.360571*1
"description": "score(doc=14539,freq=1.0 = phraseFreq=1.0 ), product of:",
"details": [
{
"value": 10,
------设置权重得分----10
"description": "boost",
"details": []
},
{
"value": 15.360571,
"description": "idf(), sum of:",------得分求和------6.522579+4.4180784+4.4199133=15.360571
"details": [
{
"value": 6.522579,
--------逆文档频率log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
--------log(1 + (45241 - 66 + 0.5) / (66 + 0.5))=6.522579
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [{
"value": 66,
"description": "docFreq",
"details": []
},
{
"value": 45241,
"description": "docCount",
"details": []
}
]
},
{
"value": 4.4180784,
-------逆文档频率log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
-------log(1 + (45241 - 545 + 0.5) / (545 + 0.5))=4.4180784
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [{
"value": 545,
"description": "docFreq",
"details": []
},
{
"value": 45241,
"description": "docCount",
"details": []
}
]
},
{
"value": 4.4199133,
------逆文档频率log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
------log(1 + (45241 - 544 + 0.5) / (544 + 0.5))
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [
{
"value": 544,
"description": "docFreq",
"details": []
},
{
"value": 45241,
"description": "docCount",
"details": []
}
]
}
]
},
{
"value": 1,
------词频归一化(freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength))
------(1 * (0 + 1)) / (1.0 + 0 * (1 - 0.75 + 0.75 * 40.96 / 30.522093))
"description": "tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:",
"details": [
{
"value": 1,
"description": "phraseFreq=1.0",
"details": []
},
{
"value": 0,
"description": "parameter k1",
"details": []
},
{
"value": 0.75,
"description": "parameter b",
"details": []
},
{
"value": 30.522093,
"description": "avgFieldLength",
"details": []
},
{
"value": 40.96,
"description": "fieldLength",
"details": []
}
]
}
]
}]
}
]
},
--------第一部分0102----------65.86487
{
"value": 65.86487,
"description": "sum of:",-------得分求和--29.351606+36.513264
"details": [
---------第一部分010201----------
{
"value": 29.351606,
"description": "weight(title:螺丝 in 14539) [PerFieldSimilarity], result of:",
"details": [
{
"value": 29.351606,
"description": "score(doc=14539,freq=1.0 = termFreq=1.0 ), product of:",---得分相乘-----4.5*6.522579*1
"details": [
{
"value": 4.5,
"description": "boost",
"details": []
},
{
"value": 6.522579,
-----逆文档频率log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
-----log(1 + (45241 - 66 + 0.5) / (66 + 0.5))
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [
{
"value": 66,
"description": "docFreq",
"details": []
},
{
"value": 45241,
"description": "docCount",
"details": []
}
]
},
{
"value": 1,
------词频归一化(freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength))
------(1.0 * (0 + 1)) / (1.0 + 0 * (1 - b + b * 40.96 / 30.522093))
"description": "tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:",
"details": [{
"value": 1,
"description": "termFreq=1.0",
"details": []
},
{
"value": 0,
"description": "parameter k1",
"details": []
},
{
"value": 0.75,
"description": "parameter b",
"details": []
},
{
"value": 30.522093,
"description": "avgFieldLength",
"details": []
},
{
"value": 40.96,
"description": "fieldLength",
"details": []
}
]
}
]
}]
},
----------第一部分010202--------------36.513264
{
"value": 36.513264,
"description": "weight(goodsAttr.model:螺丝 in 14539) [PerFieldSimilarity], result of:",
"details": [{
"value": 36.513264,
"description": "score(doc=14539,freq=1.0 = termFreq=1.0 ), product of:",---得分相乘-----4.5*8.1140585*1
"details": [
{
"value": 4.5,
"description": "boost",
"details": []
},
{
"value": 8.1140585,
-------逆文档频率log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
------log(1 + (15034 - 4 + 0.5) / (4 + 0.5))
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [
{
"value": 4,
"description": "docFreq",
"details": []
},
{
"value": 15034,
"description": "docCount",
"details": []
}
]
},
{
"value": 1,
--------词频归一化(freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength))
--------(1.0 * (0 + 1)) / (1.0 + 0 * (1 - 0.75 + 0.75 * 7.111111 / 4.197486))
"description": "tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:",
"details": [{
"value": 1,
"description": "termFreq=1.0",
"details": []
},
{
"value": 0,
"description": "parameter k1",
"details": []
},
{
"value": 0.75,
"description": "parameter b",
"details": []
},
{
"value": 4.197486,
"description": "avgFieldLength",
"details": []
},
{
"value": 7.111111,
"description": "fieldLength",
"details": []
}
]
}
]
}]
}
]
}
]
},
--------------第一部分02-------------0
{
"value": 0,
"description": "ConstantScore(deleteFlag:[0 TO 0]), product of:",--得分相乘-------0*1
"details": [
{
"value": 0,
"description": "boost",
"details": []
},
{
"value": 1,
"description": "queryNorm",
"details": []
}
]
},
---------------第一部分03--------------0
{
"value": 0,
"description": "ConstantScore(goodsStatus:[20 TO 20]), product of:",--------得分相乘----------------0*1
"details": [{
"value": 0,
"description": "boost",
"details": []
},
{
"value": 1,
"description": "queryNorm",
"details": []
}
]
}
]
},
------------------第二部分-----------------------0
{
"value": 0,
"description": "match on required clause, product of:",--------得分相乘----------------0*1
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 1,
"description": "_type:GoodsVO, product of:",
"details": [{
"value": 1,
"description": "boost",
"details": []
},
{
"value": 1,
"description": "queryNorm",
"details": []
}
]
}
]
}
]
}
elasticsearch 文档得分计算
最新推荐文章于 2024-04-11 09:21:12 发布