/**
  * 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;
 }
Example #2
0
 /**
  * Fallback text (old text)
  *
  * @return string
  */
 public function getFallbackText()
 {
     return $this->query->getFallbackText();
 }