Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-978

Index: withNode() / withDeferAndNode() should accept a String or a List of Strings and format options as JSON Array

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.3.1
    • 2.2.8, 2.3.0
    • N1QL
    • None

    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).

      1. withNode() and withDeferAndNode() need to be overloaded to accept a List of Strings as well as a single String
      2. 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              simonbasle Simon Baslé (Inactive)
              malarky Chris Malarky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty