incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Driscoll <luke.drisc...@gmail.com>
Subject Complex Keys and Ranges
Date Fri, 11 Jun 2010 15:46:44 GMT
All,
I'm sorry if this question has been answered before, but I took a look at
the archives and couldn't find the answer that quite covers it.

I have a complex key of
[year, month, "user name", "platform", day]

The reason that I did it this way (put day at the end) is because I need to
be able to reduce to a group level of "year, month" as well as "year, month,
user", "year, month, user, platform" and "year, month, user, platform, day".
 And I didn't want to create multiple views because the data are the same

Now, when I search for date ranges like this:
startkey = [2010, 05, "", "", 1], endkey = [2010, 05, "\u9999", "\u9999",
12]
it gives me the results for the whole of May, rather than just the first
twelve days.

However, if I remove the "platform" from the key and search
startkey = [2010, 05, "", 1], endkey = [2010, 05, "\u9999", 12]
it works as expected.

Can you give me some pointers as to what I'm doing wrong, or give me some
suggestions as to how to do this better.

Thanks in advance,
Luke

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message