function search(Search_Index_Interface $index) { if ($this->sortOrder) { $sortOrder = $this->sortOrder; } else { $sortOrder = Search_Query_Order::getDefault(); } if ($this->weightCalculator) { $this->expr->walk(array($this->weightCalculator, 'calculate')); } return $index->find($this->expr, $sortOrder, $this->start, $this->count); }
function getSortOrder() { if ($this->sortOrder) { return $this->sortOrder; } else { return Search_Query_Order::getDefault(); } }