From 649de7dbb72a0ab34061f1b064b2e5bb33bfe67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 13 Jun 2024 09:35:10 +0200 Subject: [PATCH] Fix example in USER_GUIDE.md (#201) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the SQL example the `INDEX_NAME` constant was interpreted as a string literal. Signed-off-by: Tim Düsterhus --- USER_GUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index b43e9a7c..c0c90a39 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -217,7 +217,7 @@ class MyOpenSearchClass public function searchUsingSQL() { $docs = $this->client->sql()->query([ - 'query' => "SELECT * FROM INDEX_NAME WHERE name = 'wrecking'", + 'query' => "SELECT * FROM " . INDEX_NAME . " WHERE name = 'wrecking'", 'format' => 'json' ]); var_dump($docs['hits']['total']['value'] > 0);