Couchbase (CouchDB) strange view behavior with keys with zero
===

I hava a database, that contains chat messages between users (1 message copy per user: 1 message for sender and one for recepient).

I use such map function to retreive messages betwen users:

    function (doc) {
      if (doc.type == "msg"){
        emit([doc.OwnerId, doc.SndrId, doc.Date], {"Date":doc.Date, "OwnerId":doc.OwnerId, "RcptId":doc.RcptId, "SndrId":doc.SndrId, "Text":doc.Text, "Unread":doc.Unread, "id": doc.id, "type":doc.type});
        emit([doc.OwnerId, doc.RcptId, doc.Date], {"Date":doc.Date, "OwnerId":doc.OwnerId, "RcptId":doc.RcptId, "SndrId":doc.SndrId, "Text":doc.Text, "Unread":doc.Unread, "id": doc.id, "type":doc.type});
      }
    }

So if I try to receive some messages (ordered decending by date) from the beggining I used such startkey & endkey:

    startkey=[1,2,{}]
    endkey=[1,2,0]

But in this way I get not all messages. To get all messages I need to use

    startkey=[1,2,{}]
    endkey=[1,2]

Can anyone explain why it not binds all messages in first case?