From 8d40af9e7db6b596fd6fe44098af04bd57d7bba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilm=C4=81rs=20Kluss?= Date: Tue, 23 Apr 2019 16:26:31 +0300 Subject: [PATCH] set elastic index attribute prefix --- src/ElasticEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ElasticEngine.php b/src/ElasticEngine.php index 2822ad6..1c8140d 100644 --- a/src/ElasticEngine.php +++ b/src/ElasticEngine.php @@ -329,7 +329,7 @@ public function hydrateModels($model, $results) $models = new Collection(); $hits->each(function ($item, $key) use ($className, $model, $models) { - $attributes = $item['_source']; + $attributes = Arr::get($item['_source'], $model->indexAttributesPrefix); $models->put($item['_id'], new $className($attributes)); }); }