After an hour of trying various syntaxes and npm modules:
How would I achieve yielding a call to the elasticsearch client? I'm looking at something like this:
var res = yield *client.get({
index: index,
type: type,
id: id,
ignore: [404]
})
I have no idea what res should or would be, but I need to know if the document was found/exists.
Edit: Got it working with require('thunkify-wrap').genify(client.get)
.
Now both yield client.get({...})
AND yield *client.get({...})
works. Beats me.