0

How do I call Solr to return relevance scores in the result? I want to have a Solr document that includes the confidence that Solr uses internally for ranking, but I don't want to have to make a separate call to the ranker?

I tried to add the "confidence" field to the list of fields to return, but it doesn't have any data.

query.set("fl","id,title,fileName,contentHtml,searchText,sourceDocId,confidence");
query.set("debugQuery" ,true);
4

1 回答 1

1

在 fl 中使用score,它添加了为结果集中的每个文档计算的相关性得分值。

query.set("fl","id,score,title,fileName,contentHtml,searchText,sourceDocId,confidence");
于 2017-03-02T10:10:44.107 回答