Files
Phraseanet/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/OrExpression.php
Jean-Yves Gaulier d984938614 #PHRAS-622 #time 3h
add 'lenient' to prevent es errors when parsing invalid dates
cs
2015-07-29 16:39:19 +02:00

23 lines
489 B
PHP

<?php
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
class OrExpression extends BinaryOperator
{
protected $operator = 'OR';
public function buildQuery(QueryContext $context)
{
$left = $this->left->buildQuery($context);
$right = $this->right->buildQuery($context);
return [
'bool' => [
'should' => array($left, $right)
]
];
}
}