Skip to content

Commit dd59c4e

Browse files
committed
fixed hits location
1 parent 63a993e commit dd59c4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Response/ResultMapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ private function mapAggregation(
201201
}
202202
}
203203

204-
if (isset($aggregationArray[$name]['hits'])) {
205-
foreach ($aggregationArray[$name]['hits'] as $hitPosition => $hit) {
206-
$hits[] = $this->mapHit($hit, $hitPosition);
204+
if (isset($aggregationArray['hits']['hits'])) {
205+
foreach ($aggregationArray['hits']['hits'] as $hitPosition => $hit) {
206+
$hits[] = $this->mapHit($hit, (int) $hitPosition);
207207
}
208208
}
209209

0 commit comments

Comments
 (0)