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

creating index interprets String as DSL statement

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.2.6
    • 2.2.5
    • Core
    • None

    Description

      Trying to create an index with this gives an unexpected result:

              // Create an index list like this:
              //   CREATE INDEX isched
              //     ON `travel-sample` ( DISTINCT ARRAY v FOR v IN schedule END );
              // …per the example at http://developer.couchbase.com/documentation/server/4.5-dp/indexing-arrays.html
              String indexString = "( DISTINCT ARRAY v FOR v IN schedule END );";
              boolean createSuccess = bucketManager.createIndex("isched", true, true, indexString);
      

      Looking into the details, it seems to be going down the DSL path, though the javadoc indicate a String should be valid.

      The resulting index looks like this in the definitions:

      CREATE INDEX `isched` ON `travel-sample`(`( DISTINCT ARRAY v FOR v IN schedule END );`) WITH({"index_type" : "memory_optimized"}) WITH { "defer_build"=true }
      

      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)
              ingenthr Matt Ingenthron
              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