Msearch: Failed to derive xcontent

I'm trying to get back a number of results (lines from chat data) simultaneously, however I'm stymied with what is wrong with my query. I get the error "Failed to derive xcontent [parse exception]", Query is /myindex/_msearch with the following data. using the javascript client. Cant grok what is wrong here. Any help?

[{},{"query":{"bool":{"filter":[{"type":{"value":"chat"}},{"term":{"channel.kw":"CHAT-bd3e5544-8ef9-473d-82d3-143ed6ef42c2"}},{"range":{"line_number":{"gte":0,"lte":6}}}]}},"sort":[{"line_number":{"order":"asc"}}]},{},{"query":{"bool":{"filter":[{"type":{"value":"chat"}},{"term":{"channel.kw":"CHAT-b90d7105-eb0e-4d92-b910-51f597b2a809"}},{"range":{"line_number":{"gte":0,"lte":6}}}]}},"sort":[{"line_number":{"order":"asc"}}]},{},{"query":{"bool":{"filter":[{"type":{"value":"chat"}},{"term":{"channel.kw":"CHAT-863b581a-5b7a-46ec-acf1-9aba03f18617"}},{"range":{"line_number":{"gte":0,"lte":6}}}]}},"sort":[{"line_number":{"order":"asc"}}]},{},{"query":{"bool":{"filter":[{"type":{"value":"chat"}},{"term":{"channel.kw":"CHAT-cf0cb9da-68df-45b7-af70-6656319e9b85"}},{"range":{"line_number":{"gte":0,"lte":6}}}]}},"sort":[{"line_number":{"order":"asc"}}]}]

anyone?

That's not the expected format. Read https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-multi-search.html

I am referencing: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearch

According to this documentation, the JS msearch api accepts an array of objects, precisely what I'm passing in.

Can't see anything obvious as well.

I don't know the JS Client though and how it actually translates to a REST query. Could you debug it and paste here the query which is actually sent to elasticsearch?

May be it's a bug in the client?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.