Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1228

Key range error apparently ignores view collation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1
    • 1.2
    • HTTP Interface
    • None
    • Debian

    Description

      I have created a view (no reduce function) with "options":

      {"collation":"raw"}

      and emit documents with keys "A", "C" and "b". Running a request on that view with no parameters, I get as expected all three documents in order "A", "C" and "b" as required by the raw collation (instead of "A", "b", "C" for the default ICU collation).

      However, when I run a request with start key "B" and end key "a", I expect the "C" document to be returned alone (as "B" < "C" < "a") but couchDB responds:

      { "error": "query_parse_error", "reason": "No rows can match your key range, reverse your start_key and end_key or set descending=true" }

      This error would make sense if I had been using the default ICU collation, where "B" > "a", but with the raw collation the reverse ("B" > "a") is true. It looks as if the key order warning does not take the view collation into account.

      Attachments

        Activity

          People

            Unassigned Unassigned
            victor.nicollet Victor Nicollet
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: