Files
Phraseanet/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/CollectionExpression.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

35 lines
683 B
PHP

<?php
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
class CollectionExpression extends Node
{
private $collectionName;
public function __construct($collectionName)
{
$this->collectionName = $collectionName;
}
public function buildQuery(QueryContext $context)
{
return [
'term' => [
'collection_name' => $this->collectionName
]
];
}
public function getTermNodes()
{
return array();
}
public function __toString()
{
return sprintf('<collection:%s>', $this->collectionName);
}
}