Skip to content

Commit 9c0eab7

Browse files
committed
Hit can have version when option version is specified in ElasticQuery.
ResultMapper can now map bulk action responses. - New result class `ResultBulk` - `BulkAction` class to contain single bulk action response item
1 parent 9b22ad5 commit 9c0eab7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Exception/ResponseCouldNotBeMapped.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function __construct(
1212
\Throwable $previous = NULL
1313
)
1414
{
15-
parent::__construct(json_encode($message), $code, $previous);
15+
parent::__construct((string) \json_encode($message), $code, $previous);
1616
}
1717

1818
}

src/Response/ResultMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function map(
1717
$result = $this->mapSearchResults($elasticSearchResponse);
1818

1919
} elseif (isset($elasticSearchResponse['items'])) {
20-
$result = $this->mapBulkActions($elasticSearchResponse);
20+
$result = $this->mapBulkResult($elasticSearchResponse);
2121

2222
} else {
2323
throw new \Spameri\ElasticQuery\Exception\ResponseCouldNotBeMapped($elasticSearchResponse);

0 commit comments

Comments
 (0)