Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-380

Filtering on Compound Key with "+" Char Fails

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 1.3.2
    • 1.3.1
    • library
    • None

    Description

      91b, Jan 14 09:34:
      Hi,
      Filter on compound key with `+` char won`t work from C# client.
      Couchbase version: 2.2.0 enterprise edition (build-821)
      C# client: CouchbaseNetClient.1.2.9\lib\net40\Couchbase.dll
      Reproduce:
      1) Create a new bucket
      2) Create any document
      3) Create a new view (in my case :* _design/test bug*
      function (doc, meta)

      { emit([123, "a+b"], null); }

      4) Execute from c# GetView with filter on key: [123, ”a+b”]
      var testClient = new CouchbaseClient((CouchbaseClientSection)
      ConfigurationManager.GetSection("couchbase/bucket-test-bucket"));
      var item = testClient.GetView("test", "bug").Key(new object[]

      { 123, "a+b"}

      ).Stale(
      StaleMode.False).FirstOrDefault();
      if (item == null)

      { Console.Out.WriteLine("Nothing found, bug…"); }

      else

      { Console.Out.WriteLine("Key found"); }

      Zero rows found.
      ===============
      If I run in couch GUI filter on key [123,”a+b”], I get the following:
      http://plt-couchdb01.toyga.local:8092/auditing/_design/test/_view/bug?key=%5B123%2C%22a%2Bb%22%5D&stale=update_after&connection_timeout=60000&limit=10&skip=0
      Response:
      {"total_rows":1,"rows":[

      {"id":"abc","key":[123,"a+b"],"value":null}

      ]}
      In Fidler I see that ‘’ character still ‘’, but in request from couch GUI
      ‘+’ is ‘%2B’

      Attachments

        For Gerrit Dashboard: NCBC-380
        # Subject Branch Project Status CR V

        Activity

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            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