Skip to content

Commit 4bd08f6

Browse files
committed
type may not be set
1 parent 2c1fd67 commit 4bd08f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Response/ResultMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private function mapHit(
115115
$hit['_source'] ?? [],
116116
$position,
117117
$hit['_index'],
118-
$hit['_type'],
118+
$hit['_type'] ?? '_doc',
119119
$hit['_id'],
120120
$hit['_score'] ?? 1,
121121
$hit['version'] ?? 0,
@@ -146,7 +146,7 @@ public function mapBulkAction(
146146
return new \Spameri\ElasticQuery\Response\Result\BulkAction(
147147
$actionType,
148148
$bulkAction['_index'],
149-
$bulkAction['_type'],
149+
$bulkAction['_type'] ?? '_doc',
150150
$bulkAction['_id'],
151151
$bulkAction['_version'],
152152
$bulkAction['result'],

0 commit comments

Comments
 (0)