diff --git a/src/Model.php b/src/Model.php index e060ac4..6779d83 100755 --- a/src/Model.php +++ b/src/Model.php @@ -60,7 +60,7 @@ * @property-read string|null _index * @property-read string|null _type * @property-read float|null _score - * @property-read array|null _highlight + * @property-read array|null highlight * * @package Matchory\Elasticsearch */ @@ -916,7 +916,7 @@ public function getScore(): ?float */ public function getHighlight(): ?array { - return $this->getResultMetadataValue('_highlight'); + return $this->getResultMetadataValue('highlight'); } /** @@ -932,7 +932,7 @@ public function getHighlight(): ?array */ public function getHighlights($field = null) { - $highlights = $this->getAttribute('_highlight'); + $highlights = $this->getAttribute('highlight'); if ($field && array_key_exists($field, $highlights)) { return $highlights[$field];