Merge metadata & native key expressions

Do not delegates query building to Key instance anymore.
This commit is contained in:
Mathieu Darse
2015-11-05 16:52:01 +01:00
parent 803a9010a5
commit 713442c7b4
10 changed files with 70 additions and 194 deletions

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Phrasea\SearchEngine\Elastic\AST\KeyValue;
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
use Assert\Assertion;
class MetadataKey
class MetadataKey implements Key
{
private $name;
@@ -15,8 +15,13 @@ class MetadataKey
$this->name = $name;
}
public function getIndexField()
{
return sprintf('exif.%s', $this->name);
}
public function __toString()
{
return $this->name;
return sprintf('metadata.%s', $this->name);
}
}