Always empty result when using map reduce with date

In the Ubuntu SDK version, I faced the problem, that I can’t send a range-request to a map, limiting on a date.

When using the web-interface, I can easily query all documents between ["foo", "2014-03-25T11:00:00+00:00"] and ["foo", []] but when I try to execute this in a query using the SDK, it returns NULL.

Here’s my PHP code:

$res = $couchbase->query(
    \CouchbaseViewQuery::from("integration", "ids")
        ->range(array("foo", "S2014-03-25T11:00:00+00:00"), array("foo", array())));

It must have something to do with the + sign, because that request works as expected if I strip off the time-offset +00:00.

Hey @SimonSimCity,

I have opened a ticket for this issue, you can track the status there!

Cheers, Brett

Hi, @brett19

Thanks for adding it. Can you please also add a note, that this also applies to & - the ampersand char?

But this maybe is a different issue, because it returns the following exception:

CouchbaseException: bad_request: invalid UTF-8 JSON: {{error,insufficient_data},"[null,\"foo "} in [CouchbaseNative]/CouchbaseBucket.class.php on line 285

Here’s my code:

\CouchbaseViewQuery::from("contributor", "by_name")
    ->key([null, "foo & bar"])