Skip to content

Commit 4204769

Browse files
kaylareopellepicandocodigo
authored andcommitted
Update Ruby client examples
* One of the code blocks didn't include the word `ruby`, causing it to be a different color and difficult to read * One of the examples raised an error: "illegal_argument_exception","reason":"request [/books/_search] contains unrecognized parameter: [field]"
1 parent 857fccb commit 4204769

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/examples.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ client.get(index: 'books', id: id)
5252

5353
Assume you have the following document:
5454

55-
```
55+
```ruby
5656
book = {"name": "Foundation", "author": "Isaac Asimov", "release_date": "1951-06-01", "page_count": 224}
5757
```
5858

@@ -166,7 +166,7 @@ The `field` parameter is a common parameter, so it can be passed in directly in
166166
the following way:
167167

168168
```ruby
169-
client.search(index: 'books', q: 'dune', field: 'name')
169+
client.search(index: 'books', q: 'dune')
170170
```
171171

172172
You can do the same by using body request parameters:

0 commit comments

Comments
 (0)