Closed (fixed)
Project:
Apache Solr Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2011 at 00:49 UTC
Updated:
13 Jun 2012 at 05:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
niyas commentedHello,
In views table settings, you should find an option as "sortable" for all fields which you have displayed in table.
Check it out!
Thanks.
Comment #2
modstore commentedYep, sortable is selected for each field. I click one of the table headers and it re-loads but sorting doesn't change.
Comment #3
becw commentedClick sorting is enabled for all fields in Apache Solr Views'
hook_views_data()implementation, but isn't supported by the current field handler (apachesolr_views_handler_field): the Apache Solr Views query plugin usesapachesolr_views_query::add_sort()and the default views field handler applies click sorts using the::add_orderby()method. The attached patch fixes this issue by implementingapachesolr_views_handler_field::click_sort()and calling theadd_sort()method instead.This patch also allows an alternate Solr field to be used for click sorting--this works in tandem with my patch in #1408500: Views of non-default Apache Solr "environments" (patch).
I've found that not all fields sort logically; for example, the
entity_idfield does not sort, even when explicitly specifying the sort in the "Sort criteria" section of the view.Comment #4
becw commentedComment #5
ygerasimov commentedCommitted. Thank you!