Skip to content

Commit 6824f97

Browse files
ENGCOM-2135: Use the timeout when querying Elasticsearch #15592
2 parents b3ac99e + 34dd540 commit 6824f97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ public function deleteMapping($index, $entityType)
293293
*/
294294
public function query($query)
295295
{
296-
return $this->client->search($query);
296+
$params = array_merge($query, ['client' => ['timeout' => $this->clientOptions['timeout']]]);
297+
return $this->client->search($params);
297298
}
298299

299300
/**

0 commit comments

Comments
 (0)