Can Solr boost results on number of social “likes”?

孤街浪徒 提交于 2019-11-26 16:40:41

问题


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)

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

How can I boost a result based on the number of likes, given that each like exist on it's own row?


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?


回答1:


Take a look at ExternalFileField. There isn't a lot of documentation about it at the moment, but see this presentation.




回答2:


Also take a look at click-through relevance ranking presentation



来源:https://stackoverflow.com/questions/8411860/can-solr-boost-results-on-number-of-social-likes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!