diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php index 471f21263e..31bd93d691 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Search/QueryVisitor.php @@ -241,7 +241,7 @@ class QueryVisitor implements Visit throw new \Exception('Unexpected context after non-contextualizable node'); } } elseif ($node instanceof AST\Node) { - $root = new AST\AndExpression($root, $node); + $root = new AST\Boolean\AndOperator($root, $node); } else { throw new \Exception('Unexpected node type inside text node.'); } diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/resources/queries.csv b/tests/Alchemy/Tests/Phrasea/SearchEngine/resources/queries.csv index b176aaa482..93c9c3a868 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/resources/queries.csv +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/resources/queries.csv @@ -1,5 +1,7 @@ foo| foo (bar)| +foo "bar"|( AND ) +"foo" bar|( AND ) # foo ("bar baz")| foo bar| foo bar (baz qux)|