Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.1
    • None
    • library
    • None
    • 1

    Description

      I can’t get idRange to work in SDK 3.x (up to .3.1.0).
      I am passing a valid range start and end, and without idRange set it returns all docs between start and end. However, if I then set idRange start/end it doesn’t return any results. I know that the IDs passed in idRange must match docs returned by the range keys.

      If I try the same query in the CB GUI I can get it to work. However, I need to make sure that the IDs passed for startkey_docid and endkey_docid are not quoted. i.e. 123456 works but "123456" doesn’t. Looking in the SDK source I think this points me to the problem. In viewexecutor.js it says:

       

      {{ if (options.idRange)

      { queryOpts.startkey_docid = JSON.stringify(options.idRange.start); queryOpts.endkey_docid = JSON.stringify(options.idRange.end); }

      }}

      I think the start and end values should not be stringified as I think that will send the values to CB with the quotes. I haven’t rebuilt the SDK source to test this possible fix though so I’m not certain it’s the issue.

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            arun.vijayraghavan Arun Vijayraghavan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty