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

ComplexKey does not support partial compound keys with single field

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1-beta
    • Fix Version/s: 1.1.0
    • Component/s: Documentation
    • Security Level: Public
    • Labels:
      None

      Description

      I can't figure out how to do partial compound keys with a single value –

      ex. 1 - Specifying both parts of the key:
      http://localhost:8092/bucketname/_design/mydesigndoc/_view/myview?group_level=1&startkey=["0",1351742400000]&endkey=["Z",1353073898844]

      ex. 2 - Only specifying the first part of the key:
      http://localhost:8092/bucketname/_design/mydesigndoc/_view/myview?group_level=1&startkey=["0"]&endkey=["Z"]

      I can get ex. 1 to work via the Java client library, but I've had no luck with ex. 2. I've tried setting ranges, complex keys and regular keys. The closest I get is a query string where the "[" and "]" have been escaped which results in a bad URL. I was only able to get this far by manually concatenating the "[" and "]" onto my key and using the query.setKey(String) method.

      I believe that ComplexKey should be able to handle ex 2 by calling ComplexKey.of("0") and ComplexKey.of("Z").

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

        Activity

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            ctash_jt Chris Tashjian
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes