mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
22 lines
454 B
PHP
22 lines
454 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
|
|
|
|
class ExceptExpression extends BinaryOperator
|
|
{
|
|
protected $operator = 'EXCEPT';
|
|
|
|
public function getQuery($fields = ['_all'])
|
|
{
|
|
$left = $this->left->getQuery($fields);
|
|
$right = $this->right->getQuery($fields);
|
|
|
|
return array(
|
|
'bool' => array(
|
|
'must' => $left,
|
|
'must_not' => $right
|
|
)
|
|
);
|
|
}
|
|
}
|