Closed (won't fix)
Project:
Fivestar
Version:
6.x-1.19
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Apr 2010 at 01:13 UTC
Updated:
19 Jan 2017 at 17:21 UTC
Jump to comment: Most recent
I allow users to vote via Fivestar CCK and am interested in including a block that will allow users to sort content from highest to lowest and vice versa in the search results page via the Apache Solr Search Integration module. Solr search is way better than that of Core’s and as such, I chose to utilize Solr. This would be an awesome feature and I’m hoping someone can help.
Comments
Comment #1
wonder95 commentedSee my issue in the Fivestar issue queue for a similar question on getting the Fivestar data for Solr. In your case, once you have the Fivestar data, you would just need to implement the hook_apachesolr_prepare_query() and hook_apachesolr_update_index() hooks in your module. hook_apachesolr_update_query() adds the data to the Solr index, and hook_apachesolr_prepare_query() adds the sort option to the Apache Solr Core: Sorting block.
As an example, here's an implementation I wrote that adds a custom sort on node views based on data in the statistics module:
As you can see, it doesn't require much code at all. I'd be willing to bet Robert and James would be willing to accept a patch for this, too.
The video from the session at Drupalcon San Francisco on Apache Solr Search Mastery gives a lot of great info on how to do this.
Comment #2
AntiNSA commentedI cant get it to sort properly ... I get this error http://drupal.org/node/802230 not using Solr.
Comment #3
dbt102 commentedFivestar for Drupal 6
Drupal 6 is now end of life, and is no longer supported. So Drupal 6 issues for Fivestar are being closed as "Closed (won't fix)". However, we don't want users who are porting from Drupal 6 to 7 to feel unwanted, so if you have any migration issues, please open them as Drupal 7 issues.