Solr 可以提高社交“喜欢"数量的结果吗? [英] Can Solr boost results on number of social "likes"?
问题描述
我正在尝试根据喜欢"的数量对结果进行排序.
I am trying to order the results based on the number of "likes".
最明显的解决方案是为每一行设置一个喜欢"字段,并为每个点击喜欢"的用户重新索引文档.但在这种情况下,重新索引大型文档并不实用.
The most obvious solution is to have a "likes" field for each row and re-index the document for every user who clicks "like". But re-indexing large documents isnt practical in this case.
(以下为举例:不涉及大文件)
(following is for the sake of example: no large documents involved)
理想情况下,我希望将 Solr 中的数据和用户操作作为单独的行进行索引.
Ideally, I would like to index both the data and the user actions in Solr as separate rows.
数据行(如下所示)随着时间的推移相对稳定.
The data rows (as shown below) are relatively stable over time.
id:place_1
title: ela restaurant
meta: sea food, chinese food festival
description: this place...
操作行 会在用户每次点击赞"时插入.
The action rows are inserted each time the user clicks "like".
id:action_43141
action:like
user:john
target:place_1
id:action_44323
action:like
user:doe
target:place_1
<小时>
如果每个赞都存在于自己的行中,我如何根据点赞数提升结果?
我知道在即将到来的 Solr 4.0 中存在连接 http://wiki.apache.org/solr/加入.但它会根据匹配行的数量提高分数吗?
I know there exist joins in the upcoming Solr 4.0 http://wiki.apache.org/solr/Join . But would it improve scores based on number of matching rows?
推荐答案
看看 ExternalFileField.目前关于它的文档并不多,但请参阅 此演示文稿.
Take a look at ExternalFileField. There isn't a lot of documentation about it at the moment, but see this presentation.
这篇关于Solr 可以提高社交“喜欢"数量的结果吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!