我想弄清楚某些文档被排名为某些关键字搜索的结果。
我正在使用Marklogic' s / MarkLogic / appservices / search,并将相关性跟踪和返回计划设置为true。
我得到的结果如下:
<qry:or>
<qry:score formula="scoreSum" computation="507+507+507+507+507+507+507+8151+507+2358+2358+9096">26019</qry:score>
<qry:term weight="4.875">
<qry:score formula="8*weight*logtf" computation="39*13">507</qry:score>
<qry:key>18088380461678133729</qry:key>
<qry:annotation>word("Marketing")</qry:annotation>
</qry:term>
.
.
.
<qry:term weight="142.125">
<qry:score formula="8*weight*logtf" computation="1137*8">9096</qry:score>
<qry:key>17170145643344834189</qry:key>
<qry:annotation>element(http://<removed this>/resolved:description,word("Marketing"))</qry:annotation>
</qry:term>
我想知道的是qry如何:术语体重 =&#34; 142.125&#34;正在计算?我知道我可以权衡文档的质量,术语,并且文档上有质量得分。这是如何计算的?
我没有在文档中看到有关权重属性的任何内容,更多内容只是在分数计算上。
https://docs.marklogic.com/guide/search-dev/relevance
谢谢!
我发现查询及以下是我认为是查询的相关部分:
cts:and-query((cts:registered-query(13876289435580202480, ("unfiltered"), 1),
cts:or-query((cts:element-word-query(fn:QName("http://<removed>/resolved","<removed>AuthorLastName"), "Mcconnell", ("case-insensitive","diacritic-insensitive","punctuation-insensitive","lang=en"), 16),
cts:near-query(cts:and-query(cts:word-query("Mcconnell", ("case-insensitive","diacritic-insensitive","punctuation-insensitive","lang=en"), 1), ()), 2, ("ordered"), 1),
cts:element-word-query(fn:QName("http://<removed>/resolved","keyword"), "Mcconnell", ("case-insensitive","diacritic-insensitive","punctuation-insensitive","lang=en"), 14),
cts:near-query(cts:and-query(cts:word-query("Mcconnell", ("case-insensitive","diacritic-insensitive","punctuation-insensitive","lang=en"), 1), ()), 2, ("ordered"), 1),
这是分数摘要中连接元素字查询的部分。
<qry:term weight="184.625">
<qry:score formula="8*weight*logtf" computation="1477*3">4431
</qry:score>
<qry:key>6578622261224561690
</qry:key>
<qry:annotation>element(http://<removed>/resolved:AuthorLastName,word("Mcconnell"))
</qry:annotation>
</qry:term>
我看到16是我们的代码注入元素字查询的权重。我仍然没有得到184.625的价值。我知道我可以通过增加16来操纵这个184.625但是如何计算?