mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 06:23:18 +00:00

- Look for text nodes and infer the concepts behind term using thesaurus - Use value objects for thesaurus terms and concepts - Pass a QueryContext holding allowed fields and locales informations when building the Elasticsearch query - Change type hinting and name of query building method on nodes - Remove unused method Node#isFullTextOnly() - Move getFieldsStructure from RecordIndexer to RecordHelper for reusing field structure in SearchEngine
30 lines
613 B
PHP
30 lines
613 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
|
|
|
|
abstract class BinaryOperator extends Node
|
|
{
|
|
protected $left;
|
|
protected $right;
|
|
protected $operator = 'BIN_OP';
|
|
|
|
public function __construct(Node $left, Node $right)
|
|
{
|
|
$this->left = $left;
|
|
$this->right = $right;
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return sprintf('(%s %s %s)', $this->left, $this->operator, $this->right);
|
|
}
|
|
|
|
public function getTextNodes()
|
|
{
|
|
return array_merge(
|
|
$this->left->getTextNodes(),
|
|
$this->right->getTextNodes()
|
|
);
|
|
}
|
|
}
|