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.
IMO the sticky flag should override other measures of relevance. I think this patch does the trick:
624d623
< $ranking[] = 'n.sticky * 100';
652c651
< }
---
> }
Comments
Comment #1
David Lesieur CreditAttribution: David Lesieur commentedHardcoding stickiness as a ranking factor the way you propose it probably won't be appropriate with all projects. If we want to take stickiness into account, I think we should do so through a more flexible framework for adding ranking factors. Perhaps we could integrate with the Search Ranking project (http://drupal.org/project/search_ranking).
Comment #2
David Lesieur CreditAttribution: David Lesieur commentedMarked #365561: Faceted Search ignores "Always on top of lists" as duplicate.
Comment #3
idmacdonald CreditAttribution: idmacdonald commentedYes, integration with the Search Ranking module would be very useful. However, I just looked at the code used by that module, and the way the faceted search system builds the rankings, and it looks like it could be a fair amount of work to integrate the two. I would be interested in helping with the work, possibly, but it looks like a fairly daunting task to me at the moment.
Comment #4
skilip CreditAttribution: skilip commentedAny progress on this?
Comment #5
skilip CreditAttribution: skilip commentedI've managed to fix this with the following code:
Comment #6
austinh7 CreditAttribution: austinh7 commentedApologies for dragging this up from the depths but this works perfectly for me, thought others might like to know...