You could precompute ranges depending on your needs. E.g. You could have properties for each MyKind entity called things like FOOGTZERO, FOOGTONEHUN, FOOGTTWOHUN or whatever.. hopefully, you could come up with better names than I am.
then.. if foo > 0.. set FOOGTZERO = 1 and if foo>100 set FOOGTONEHUN = 1 .. etc (foo<100 and you set FOOGTONEHUN = 0) Thus.. if you have set search ranges like this, you could do a query like: Select * from MyKind Where FOOGTONEHUN = 1 AND BARGTFOURTY = 0 AND date > someDate Of course, you need a composite index on all three properties. Naturally, this breakdown would be very dependent on what your data is like and the ranges that would work for you. Maybe it would make more sense to precompute date ranges instead of foo ranges or bar ranges... etc. On Sat, Mar 13, 2010 at 7:53 AM, Patrick Twohig <[email protected]>wrote: > So, the business requirements of my application need a query which needs to > search for a property (let's call it "foo") and a date property such that it > will filter out all objects older than a certain date. I guess in GAE/J > this would be something like.... > > Query q = new Query("MyKind") > .addFilter("foo", GREATER_THAN, 0) > .addFilter("bar", LESS_THAN, 42) > .addFilter("date", GREATER_THAN, someDate); > > But, I'm guessing that wouldn't work because it's got inequality filters on > multiple properties. Would there be a way to get a similar result without > loading a huge amount of entities into memory and filtering them out > manually? > > > -- > Patrick H. Twohig. > > Namazu Studios > P.O. Box 34161 > San Diego, CA 92163-4161 > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
