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?
Take a look at ExternalFileField. There isn't a lot of documentation about it at the moment, but see this presentation.
Also take a look at click-through relevance ranking presentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With