Description
Currently, the withNode() and withDeferAndNode() methods only accept a single String for the node name, and then with() formats this as a single JSON item in options.
The correct syntax for CREATE INDEX is actually an array of nodes (WITH {"nodes":["nodeA:8091"]}, see http://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/createindex.html).
- withNode() and withDeferAndNode() need to be overloaded to accept a List of Strings as well as a single String
- with() needs to format options using a JsonArray for nodes rather than just a String, regardless of what is passed in.
The tests at https://github.com/couchbase/couchbase-java-client/blob/master/src/test/java/com/couchbase/client/java/query/dsl/IndexDslTest.java#L98 will also need updating.
Attachments
Issue Links
- relates to
-
DOC-1452 GSI Examples "CREATE INDEX ... WITH" nodes should be array
- Closed