/** * Run fall-back correction * * @return bool */ public function doFallbackCorrection() { $queryText = $this->queryHelper->getQueryText(); $fallbackText = $this->queryHelper->fallback($queryText); if ($fallbackText && $fallbackText != $queryText && $fallbackText != $this->queryHelper->getFallbackText()) { $url = $this->queryHelper->getFallbackUrl($queryText, $fallbackText); $this->response->setRedirect($url); return true; } return false; }
/** * Current search query text * * @return string */ public function getQueryText() { return $this->query->getQueryText(); }