I have the model:

class Record(db.Model):
  date = db.DateProperty()

Over 1000 Record instances may contain the same date value. The
instances are also not created in the order of their dates.

I'm trying to query all instances whose date is within a given range.
I need to be able to query sets larger than the default max of 1000.

I was thinking of doing something like:

Record.all().filter('date >', startDate).filter('date <', endDate)

But this would limit me at most to the first 1000 records. How would I
get the next 1000 records, maintaining the range query? I can't use
the last date value from the previous query as the startDate for the
next query, since there's no guarantee that the date value has
changed. For example, I could have 2000 instances with the date
2008-1-1, so the first and second query sets have identical filter
parameters.

Intuitively, I could accomplish this by simply filtering on the
previous key value (e.g. .filter('key >', lastKeyValue)).
Unfortunately, App Engine currently prohibits filtering with
inequality operators on more than one property.

Am I correct in understanding that there's essentially no way to query
all instances within a specific date range, due to this limitation?

This issue keeps coming up for me, and has been a huge deal-breaker in
a lot of potential projects I've been working on for App Engine. Any
advice on how I could work around it would be appreciated.

Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to