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.
I have no idea why, but 'score' doesn't seem to be available as a sort criteria when creating a Solr-based view using this module.
Anyway, failing the ability to define 'score' in the view, I think we should at the least ensure that the default sorting method for Solr-based views is 'score desc', when no other sorting criteria are defined.
Attached patch achieves this.
Comment | File | Size | Author |
---|---|---|---|
apachesolr_views_defaultsort_scoredesc.patch | 752 bytes | Jaza | |
Comments
Comment #1
scalp CreditAttribution: scalp commentedWorks as intended. Thanks.
Comment #2
MiroslavBanov CreditAttribution: MiroslavBanov commentedI think there is a score filter right now, and it was already available when this issue was created.
Moreover sorting by score desc is the default solr behavior when you don't add any sort parameter to the query. So it should already be working correctly, without the patch.
If there still is a problem, please describe the scenario or steps needed to reproduce it.
Comment #3
MiroslavBanov CreditAttribution: MiroslavBanov commented