Skip to content

Commit ca5fb00

Browse files
Added multisearch usage in documentation (#1863)
Co-authored-by: Fernando Briano <[email protected]>
1 parent 3e49c1f commit ca5fb00

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/examples.asciidoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ the Ruby client.
1010
* <<ex-delete>>
1111
* <<ex-bulk>>
1212
* <<ex-search>>
13+
* <<ex-multisearch>>
1314
* <<ex-scroll>>
1415
* <<ex-reindex>>
1516

@@ -177,6 +178,20 @@ response['hits']['hits'].count # => 15
177178
```
178179

179180

181+
[discrete]
182+
[[ex-multisearch]]
183+
=== Multi search
184+
The following example shows how to perform a multisearch API call on `books` index:
185+
```ruby
186+
body = [
187+
{},
188+
{query: {range: {page_count: {gte: 100}}}},
189+
{},
190+
{query: {range: {page_count: {lte: 100}}}}
191+
]
192+
client.msearch(index:'books', body: body)
193+
```
194+
180195
[discrete]
181196
[[ex-scroll]]
182197
=== Scrolling

0 commit comments

Comments
 (0)