diff --git a/src/ElasticSearch/Facet/Type/KeywordFacet.php b/src/ElasticSearch/Facet/Type/KeywordFacet.php index ffc1aacab801ce376f4c9a3e8d459c9775d1a87f..b525e51530dce6c38dccde88177be4ed1529516b 100644 --- a/src/ElasticSearch/Facet/Type/KeywordFacet.php +++ b/src/ElasticSearch/Facet/Type/KeywordFacet.php @@ -11,9 +11,13 @@ final class KeywordFacet extends Facet */ public function es(): array { + $value = is_array($this->value) ? + array_map(static fn($value) => (string) $value, $this->value) : + (string) $this->value; + return [ 'facet_code' => $this->property->getKey(), - 'facet_value' => (string) $this->value, + 'facet_value' => $value ]; } }