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

dawehner’s picture

Can you please provide a real patch for this change? This would help to get this error fixed.

dawehner’s picture

Status: Active » Fixed

This would have been so easy if you would have created a patch.

Anyway solved this a bit cleaner.

Status: Fixed » Closed (fixed)

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