Update elasticsearch-js msearch body format
Although _msearch using the web API will allow the body to not have leading underscores before the keys "index" and "type" (e.g. `{"index": "my-index", "type": "my-type"}
{"query": ... }`), the Javascript Elasticsearch client.msearch will give the error "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed]" if the body follows the same format. Adding the leading underscores fixes this issue.
This commit is contained in:
@ -1220,7 +1220,7 @@ client.msearch({
|
||||
{ query: { match_all: {} } },
|
||||
|
||||
// query_string query, on index/mytype
|
||||
{ index: 'myindex', type: 'mytype' },
|
||||
{ _index: 'myindex', _type: 'mytype' },
|
||||
{ query: { query_string: { query: '"Test 1"' } } }
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user