Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As part of my summer of code project I have back-ported a new patch that got into Drupal HEAD which allows contributed modules to interact with the Drupal core search module's result ranking. I wrote an implementation of hook_ranking() for the fivestar module that makes nodes with higher average ratings float to the top of search results. The patch includes a new test file that provides simpletest coverage for the additions.
Requirements:
- Requires search_ranking module: http://drupal.org/project/search_ranking
Comment | File | Size | Author |
---|---|---|---|
#3 | search_ranking.patch | 2.74 KB | BlakeLucchesi |
fivestar_search_ranking.patch | 2.89 KB | BlakeLucchesi | |
Comments
Comment #1
cwgordon7 CreditAttribution: cwgordon7 commentedSubscribe. :)
Comment #2
quicksketchSeems like this should belong in VotingAPI rather than Fivestar. Fivestar is simply a widget for registering votes; it doesn't deal with calculations or things that interact with the votingAPI tables.
Comment #3
BlakeLucchesi CreditAttribution: BlakeLucchesi commentedRe-rolled for votingapi module. Passes simple test.
Comment #4
torotil CreditAttribution: torotil commentedThis is pretty stale. The search_ranking module doesn't have a D7 version yet. Since active development is happening in 7.x-3.x now I won't commit this. Please reopen if there is a search_ranking version for D7 and a ported patch for the current version of votingapi.
Comment #5
torotil CreditAttribution: torotil commented