Skip to content

Commit

Permalink
Fix example in USER_GUIDE.md (#201)
Browse files Browse the repository at this point in the history
In the SQL example the `INDEX_NAME` constant was interpreted as a string literal.

Signed-off-by: Tim Düsterhus <[email protected]>
  • Loading branch information
TimWolla authored Jun 13, 2024
1 parent 040e70d commit 649de7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 649de7d

Please sign in to comment.