diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/AndOperator.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/AndExpression.php similarity index 90% rename from lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/AndOperator.php rename to lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/AndExpression.php index 763710a8f0..99602a879f 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/AndOperator.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/AndExpression.php @@ -4,7 +4,7 @@ namespace Alchemy\Phrasea\SearchEngine\Elastic\AST\Boolean; use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext; -class AndOperator extends BinaryOperator +class AndExpression extends BinaryExpression { protected $operator = 'AND'; diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/BinaryOperator.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/BinaryExpression.php similarity index 93% rename from lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/BinaryOperator.php rename to lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/BinaryExpression.php index 34a0acc37b..afcb1f1578 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/BinaryOperator.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/BinaryExpression.php @@ -4,7 +4,7 @@ namespace Alchemy\Phrasea\SearchEngine\Elastic\AST\Boolean; use Alchemy\Phrasea\SearchEngine\Elastic\AST\Node; -abstract class BinaryOperator extends Node +abstract class BinaryExpression extends Node { protected $left; protected $right; diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/ExceptOperator.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/ExceptExpression.php similarity index 90% rename from lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/ExceptOperator.php rename to lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/ExceptExpression.php index 8e07bad56f..e0305d5a5e 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/ExceptOperator.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/ExceptExpression.php @@ -4,7 +4,7 @@ namespace Alchemy\Phrasea\SearchEngine\Elastic\AST\Boolean; use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext; -class ExceptOperator extends BinaryOperator +class ExceptExpression extends BinaryExpression { protected $operator = 'EXCEPT'; diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/OrOperator.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/OrExpression.php similarity index 91% rename from lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/OrOperator.php rename to lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/OrExpression.php index f716e0178a..304294c7f8 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/OrOperator.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/Boolean/OrExpression.php @@ -4,7 +4,7 @@ namespace Alchemy\Phrasea\SearchEngine\Elastic\AST\Boolean; use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext; -class OrOperator extends BinaryOperator +class OrExpression extends BinaryExpression { protected $operator = 'OR'; diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php index 2efbc0ed2e..2e4df86afc 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php @@ -125,21 +125,21 @@ class QueryVisitor implements Visit private function visitAndNode(Element $element) { return $this->handleBinaryExpression($element, function($left, $right) { - return new AST\Boolean\AndOperator($left, $right); + return new AST\Boolean\AndExpression($left, $right); }); } private function visitOrNode(Element $element) { return $this->handleBinaryExpression($element, function($left, $right) { - return new AST\Boolean\OrOperator($left, $right); + return new AST\Boolean\OrExpression($left, $right); }); } private function visitExceptNode(Element $element) { return $this->handleBinaryExpression($element, function($left, $right) { - return new AST\Boolean\ExceptOperator($left, $right); + return new AST\Boolean\ExceptExpression($left, $right); }); } @@ -236,7 +236,7 @@ class QueryVisitor implements Visit throw new Exception('Unexpected context after non-contextualizable node'); } } elseif ($node instanceof AST\Node) { - $root = new AST\Boolean\AndOperator($root, $node); + $root = new AST\Boolean\AndExpression($root, $node); } else { throw new Exception('Unexpected node type inside text node.'); }