Hi there,
I have a compound key and i’am using .net sdk,
The key:
function (doc, meta) {
emit([doc.channelId, dateToArray(doc.createdDate)], doc);
}
resulting in:
[37,[2016,2,22,13,37,4]]
When i do
var start = new object[] { 37, new[] { date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second }};
var end = new object[] { 37, new[] { date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second } };
var query = bucket.CreateQuery(“Search”, “SearchEvent”,false).StartKey(start)
.EndKey(end).Desc().Limit(5);
When i use start and end with same date everything works fine.
if i do:
var start = new object[] { 37, new[] { date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second }};
var end = new object[] { 37, new[] { date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second } };
var query = bucket.CreateQuery(“Search”, “SearchEvent”,false).StartKey(start)
.EndKey(end).Desc().Limit(5);
This give query_parse_erro and the status is BadRequest.
Is this a bug or am i missing something?