I would like update a field in one of my nodes to reflect the average of all the fivestar ratings I have. However, I want it to be indexed and searcable by开发者_开发技巧 search api/solr.
So I thought I could use a Rule to average all of the rating fields after a new comment is added (nodes are rated by the Fivestar field in a comment) and then update an integer field of the node with this new average.
Of course i would need to also re-index this node using search api - so if you tips for that as well, that would be great!
What you want is already implemented in the FiveStarVoting Module.
Have a look here: http://drupal.org/node/1308114
Unfortunately there's a bug which you can follow here: http://drupal.org/node/1245700
I hope that helped you out.
精彩评论