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:
Christine Lee
2015-07-14 12:34:38 -07:00
parent f407987160
commit 3403fb69b5

View File

@ -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"' } } }
]
});