namespace Drupal\search;
+use Drupal\Core\Database\Query\Condition;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Database\Query\SelectExtender;
use Drupal\Core\Database\Query\SelectInterface;
$this->addTag('search_' . $type);
// Initialize conditions and status.
- $this->conditions = db_and();
+ $this->conditions = new Condition('AND');
$this->status = 0;
return $this;
}
$has_or = TRUE;
$has_new_scores = FALSE;
- $queryor = db_or();
+ $queryor = new Condition('OR');
foreach ($key as $or) {
list($num_new_scores) = $this->parseWord($or);
$has_new_scores |= $num_new_scores;
}
// Build the basic search query: match the entered keywords.
- $or = db_or();
+ $or = new Condition('OR');
foreach ($this->words as $word) {
$or->condition('i.word', $word);
}
}
}
-
// Add arguments for the keyword relevance normalization number.
$normalization = 1.0 / $this->normalize;
- for ($i = 0; $i < $this->relevance_count; $i++ ) {
+ for ($i = 0; $i < $this->relevance_count; $i++) {
$this->scoresArguments[':normalization_' . $i] = $normalization;
}