Javascript API query failing

Hi All,

Newbie here and trying to use the javascript api to do a prefix search on all fields in the document. Running the prefix search using Sense works perfectly. From the js api I always get the first 10 docs in the index returned and when I examine the post url it ends with query=

Can someone point out to me what I'm doing wrong?

client.search({
index: 'candidate_quick',
type: 'profile',
query: {
prefix: {
_all: {
value: 'somevalue'
}
}
}
}, function (error, response) {
if (error) console.error(error)
else console.log(response);
});