【发布时间】:2015-06-14 07:30:36
【问题描述】:
假设我在 Solr 索引中有以下网页集合:
+-----+----------+----------------+--------------+
| ID | Domain | Path | Content |
+-----+----------+----------------+--------------+
| 1 | 1.com | /hello1.html | Hello dude |
| 2 | 1.com | /hello2.html | Hello man |
| 3 | 1.com | /hello3.html | Hello fella |
| 4 | 2.com | /hello1.html | Hello sir |
...
我想要查询hello 以显示按域分组的结果,例如:
Results from 1.com:
/hello1.html
/hello2.html
/hello3.html
Results from 2.com:
/hello1.html
如果我按分数排序,排序是如何确定的?我通常将 TF/IDF 和 PageRank 组合用于我的结果,但由于它计算每个单独项目的分数,它如何确定如何对组进行排序?如果 1.com/hello3.html 和 1.com/hello2.html 的相关性非常低但有两个结果,而 2.com/hello1.html 的相关性非常高但只有一个结果怎么办?或相反亦然?或者当分组字段中有多个项目时,是否对相关性求和?
我环顾四周,但无法找到一个好的答案。
谢谢。
【问题讨论】:
-
这取决于您的查询是什么,您是否使用分面,您使用什么查询分析器(简单或 edismax)等。也不清楚您的担忧或恐惧是什么。