Example #1
0
 /**
  * Should we skip the specified term?
  *
  * @param AbstractQuery $query         Query for which info should be retrieved
  * @param string        $term          Term to check
  * @param bool          $queryContains Should we skip the term if it is found
  * in the query (true), or should we skip the term if it is NOT found in the
  * query (false)?
  *
  * @return bool
  */
 protected function shouldSkipTerm($query, $term, $queryContains)
 {
     // If term is numeric and we're in "skip numeric" mode, we should skip it:
     if ($this->shouldSkipNumericSpelling() && is_numeric($term)) {
         return true;
     }
     // We should also skip terms already contained within the query:
     return $queryContains == $query->containsTerm($term);
 }