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.
This needs to be looked at. The way sorts are handled in apachesolr project are a bit hard to handle as well. Need another array structure to represent the sorts and then to build them. Also need some logic to produce a unique $_GET param to be used with the sorts. (with filters, Views handled this, for "exposed" sorts we going to need our own magik).
Comment | File | Size | Author |
---|---|---|---|
#25 | sort_block_hack-443410-25.patch | 860 bytes | MiroslavBanov |
#16 | sortblockattempt-443410-4609516.patch | 4.21 KB | geoffreyr |
Comments
Comment #1
Scott Reynolds CreditAttribution: Scott Reynolds commentedPlease note this is just the block. Sorts work properly though the Views Interface, just the sort block doesn't work.
Comment #2
Scott Reynolds CreditAttribution: Scott Reynolds commentedComment #3
jrabeemer CreditAttribution: jrabeemer commentedI can confirm the "Sort By" block shows up empty here.
Comment #4
domidc CreditAttribution: domidc commentedAny luck a patch exists somewhere to enable this?
Comment #5
torgosPizzaSubbing.
Comment #6
dpalmer CreditAttribution: dpalmer commentedSubscribing
Comment #7
torgosPizzaAny update on this? Does anyone have this block working? Would love to have sorting enabled this week. Started to take a look at it myself, but I'm a noob when it comes to Views (and solr, so combined it's a double whammy).. any help is appreciated.
Comment #8
nally CreditAttribution: nally commentedsubscribe
Comment #9
nally CreditAttribution: nally commentedI'm not sure what the correct approach here would be, but I've observed that setting a Sort Order and then Exposing it (within Views) doesn't add the sort to the "Apache Solr Core: Sorting" block.
My route around for now has been to do that (to expose the sort via the usual Views controls) and then (once exposed) a block will be defined that collects whichever things have been exposed (filters, sorts, etc.)
I know that this is not the solution that this thread seeks, but I include my experience here because of the lack of description for others who follow this way.
Comment #10
BeaPower CreditAttribution: BeaPower commentedIs there anyway that this will be implemented?
Comment #11
i.gajic CreditAttribution: i.gajic commentedIt's been over year and half since this issue is reported. Will this issue be fixed in reasonable time? Is there any 3rd party solution to this issue ?
Comment #12
Amy_M CreditAttribution: Amy_M commentedSubscribing
Comment #13
dirtysteak CreditAttribution: dirtysteak commentedChanging priority to major because this causes a complete loss of functionality from the standard Apache Solr module...its killing me that we can't use the two together!
We would be willing to put up $150 towards getting this fixed with a patch, anyone else willing to pony up if it will spur development??
Comment #14
LetUsBePrecise CreditAttribution: LetUsBePrecise commentedWe are also facing same problem. Not sure what can be done here. Any help on this please.
Comment #15
geoffreyr CreditAttribution: geoffreyr commentedI've had a go at patching this to try and make it work in at least Views 3.
Here are the changes I've made so far:
Unfortunately, this implementation doesn't allow for multiple sorts, so there's definitely room for improvement. (I'm not sure whether apachesolr module's sort block allows for multiple sorts, could anyone shed some light on this for me please?)
Comment #16
geoffreyr CreditAttribution: geoffreyr commented...and here's the patch. Sorry about that.
Comment #17
picxelplay CreditAttribution: picxelplay commentedapachesolr.module's sort block doesn't allow multiple sorts either. Everything seems fine to me.
Comment #18
picxelplay CreditAttribution: picxelplay commentedAny progress yet on getting this to work 'per view'?
Comment #19
smd_ksu CreditAttribution: smd_ksu commentedHow do you remove certain sorts from the block now that it appears? I tried the code below with no luck.
Comment #20
ShaneOnABike CreditAttribution: ShaneOnABike commented+1
Comment #21
Anonymous (not verified) CreditAttribution: Anonymous commentedHave a look at http://drupal.org/node/715276
Comment #22
benschaaf CreditAttribution: benschaaf commentedThis patch fails on the latest DEV release, and this is very much still an issue.
I am going to try to patch this manually, as the patch is quite old now.
Has anyone been able to get this to work? Thanks!
Comment #23
toemaz CreditAttribution: toemaz commentedApplied the patch on an old dev release and things worked out for me. Don't have the latest dev running, so I can't make a new patch for now.
Comment #24
torgosPizzaThis problem appears to still exist in 7.x as well.
Changing statuses to reflect this. If anyone has any working solutions, I'd be happy to test them as this is pretty critical.
Comment #25
MiroslavBanov CreditAttribution: MiroslavBanov commentedWell, the integration of apachesolr_views with apachesolr_search is problematic, Apachesolr module implementation of sort is also problematic.
I can suggest one of two options:
I'm demoting this to minor, because the focus here is *views* implementation to be solid.