@vinod did I mention CompositeKey anywhere? Doubtful. That class doesn’t even exists in new API. I got string keys with semicolon in them - single value with special character.
What makes you think It’s for composite key? I said that keys I’m using are regular string values. Those string values have semicolon in them but that doesn’t make them an arrays or objects.
This is what I found in official doc.
as far as I know, no, you can’t do suffix querying… these sort of keys are sorted in an alphanumerical order, and the \u0000 is a trick, since this character will be considered the highest.
see the order of these example keys with a query like startKey=aa&endKey=aa\u0000
a
aa <--starts returning from this key (first matching or greater than startKey)>
aaa
aab
aac
aargh
aaz
aaza
aazz
aazzzzzzzz <--stops returning here (last before we don't match endKey anymore)>
aa{\u0000} <--endKey's last character is alphabetically higher than anything>
ab
aba
abba
dance
For prefix querying, you do have to provide an endKey. Otherwise couchbase will just (conceptually) sort the keys, skip until it finds the matching startKey (or the existing key immediately after that alphabetically) and then return all the following keys…
PS: the fact that your keys were simple strings with a semicolon in them was not terribly obvious in your initial post
You’re right, I should put those keys in my example in quotes. Thanks for answering my question. I was afraid it’s not going to work the way I expect it to.