fixed broken NOT condition in elasticsearch

This commit is contained in:
Carsten Brandt
2014-08-12 23:14:01 +02:00
parent 25bf486b7f
commit 87427294fe

View File

@ -227,7 +227,7 @@ class QueryBuilder extends \yii\base\Object
return count($parts) === 1 ? $parts[0] : ['and' => $parts];
}
private function buildNotCondition($operator, $operands, &$params)
private function buildNotCondition($operator, $operands)
{
if (count($operands) != 1) {
throw new InvalidParamException("Operator '$operator' requires exactly one operand.");
@ -235,7 +235,7 @@ class QueryBuilder extends \yii\base\Object
$operand = reset($operands);
if (is_array($operand)) {
$operand = $this->buildCondition($operand, $params);
$operand = $this->buildCondition($operand);
}
return [$operator => $operand];