Can Solr boost results on number of social "likes"?
Asked Answered
M

2

6

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?

Macy answered 7/12, 2011 at 7:36 Comment(0)
H
4

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

Harker answered 7/12, 2011 at 13:24 Comment(1)
Right on target :-) But help on ExternalFileField is too hard to come by. I guess your answer here is relavent https://mcmap.net/q/1778611/-ordering-solr-search-result-by-day-week-month-year-viewsMacy
I
2

Also take a look at click-through relevance ranking presentation

Internalcombustion answered 7/12, 2011 at 14:10 Comment(1)
There are quite a number of commercial implementations that support social scoring.Macy

© 2022 - 2024 — McMap. All rights reserved.