Lets say I have 4 documents in my bucket:
doc-1:
{
"created_time": 1435819571221,
"field_1": false,
"field_2": false,
"version": 2
}
doc-2:
{
"created_time": 1435819571221,
"field_1": true,
"field_2": false,
"version": 3
}
doc-3:
{
"created_time": 1435819571221,
"field_1": true,
"field_2": true,
"version": 10
}
doc-4:
{
"created_time": 1435819571221,
"field_1": true,
"field_2": true,
"version": 12
}
I want to query all the docs with version >= 10.
So I created a view that emits the version as key, thinking i could query with startKey x to get all versions newer than x.
Problem is couchbase base does the querying lexicographically.
So in the example above I will get back all 4 docs.
How can i get it to work on natural order of numbers?
Thanks, Michael