I'll be rolling up a patch for the apachesolr_views module to enable views_random_seed to work properly with it. See #849650: Global: Random sort bug and add_orderby method missing in class apachesolr_views_query for more details.

CommentFileSizeAuthor
#1 1262770-1.patch1.74 KBrjbrown99

Comments

rjbrown99’s picture

Status: Needs review » Active
StatusFileSize
new1.74 KB

Without further ado, here's the patch. The reason I had to change your switch statement and pop it inside of an if/else is because $db_type is still going to be mysql/mysqli/pgsql even if the back-end in question is Solr. For now at least, all of the solr stuff happens based on the apachesolr_node base table so that's what I used. Works for me and I'm going to go to prod with it.

This is a git diff against the 6.x-1.x tree as of today.

rjbrown99’s picture

Status: Active » Needs review
swentel’s picture

Status: Active » Fixed

I've committed this - didn't test it, but should be ok I guess. I'll roll out a release as well.

rjbrown99’s picture

Thanks, I have it in production now and it's working. If I run into any issues I'll open them here with patches. This is an important part of my overall web app so it's front and center for me. Thanks for the module btw, had I known about it there would have been a lot of time saved.

rjbrown99’s picture

Thanks, and if any issues come up in the queue for this and I don't notice them feel free to ping me - I'll roll up any needed bugfixes. But at least for me it continues to work well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.