示例#1
0
 /**
  * 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;
 }
示例#2
0
 /**
  * Current search query text
  *
  * @return string
  */
 public function getQueryText()
 {
     return $this->query->getQueryText();
 }