Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.0-rc1
Component:
search data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2011 at 00:46 UTC
Updated:
26 Aug 2011 at 20:22 UTC
I setup a search argument on a view. It works, but I cannot sort the view by the search score. I have fixed the problem by adding the following code to the end of the function in modules/search/views_handler_sort_search_score.inc
foreach ($this->view->argument as $handler) {
if (isset($handler->search_score) && $handler->relationship == $this->relationship) {
$this->query->add_orderby(NULL, NULL, $this->options['order'], $handler->search_score);
$this->table_alias = $handler->table_alias;
return;
}
}
Comments
Comment #1
dawehnerCan you please provide a real patch for this change? This would help to get this error fixed.
Comment #2
dawehnerThis would have been so easy if you would have created a patch.
Anyway solved this a bit cleaner.