Had to go through some hoops in order to get N1ql queries working through the node client.
To start, the line from the documentation lists to enable N1ql with the following line:
myBucket.enableN1ql(['http://1.1.1.1:8093/','http://1.1.1.2:8093/']);
However, the Node.js SDK attaches http://
and /query
anyways:
var uri = 'http://' + host + '/query';
So, in this example it should instead be entered:
myBucket.enableN1ql(['1.1.1.1:8093','1.1.1.2:8093']);
Otherwise it will attempt to access http://http://1.1.1.1:8093//query
.
EDITED: I removed my second problem/fix as I see it’s fixed in the latest version of the code. The object model for the response changed in DP4 and I must have missed the update!