Files
elasticsearch-js/docs/_examples/msearch.asciidoc
Spencer 9e3b71510f [15.x] Update docs to use async/await (#667) (#668)
Backports the following commits to 15.x:
 - Update docs to use async/await  (#667)
2018-05-23 14:32:16 -07:00

16 lines
399 B
Plaintext

.Perform multiple different searches, the body is made up of meta/data pairs
[source,js]
---------
const response = await client.msearch({
body: [
// match all query, on all indices and types
{},
{ query: { match_all: {} } },
// query_string query, on index/mytype
{ index: 'myindex', type: 'mytype' },
{ query: { query_string: { query: '"Test 1"' } } }
]
});
---------