There is a problem with how exposed sporting work. The views exposed form plugin is trying to reset the query sorting criteria, and build them anew, but the apachesolr_views_query plugin doesn't use the $orderby property for sorting.

Also it is not possible to use multiple sorting criteria with the setSolrsort method. This is an apachesolr module limitation.

Patch pending

Comments

miroslavbanov’s picture

Status: Active » Needs review
StatusFileSize
new1.37 KB

Patch attached. As I mentioned in the summary, the views_plugin_exposed_form plugin needs to be able to reset the sorting criteria, by accessing orderby:

        $view->query->orderby = array();

So $orderby must be used for sorting and to be accessible, as it is in the views_plugin_query_default plugin.

jarrodirwin’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed and tested. This patch fixed my issue of multiple sort parameters not being added to the solr query.

  • MiroslavBanov committed 9ffb2fd on 7.x-1.x
    Issue #2145205 by MiroslavBanov: Support exposed sorting and multiple...
miroslavbanov’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Status: Fixed » Closed (fixed)

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