It just occurred to me that my previous post is incorrect.  I should
probably wait until I've had more coffee in the morning before
offering lame advice ;-)

In my example, the equality is still failing for either 'a" or 'ab'
which will prevent getting a result.

On Nov 24, 10:27 am, Joseph Letness <[email protected]> wrote:
> If 'a' is not a ListProperty you will never get a matching result for
> "a=x AND a=y".  What is sounds like is that you want something like
> this "b=z AND c=t AND(a=x OR a=y)". Unfortunately, AFAIK, this will
> not work with current implementation of the datastore due to the query
> generating an exploding index (although, I think this will be covered
> as part of the "Next-Gen Queries" when they are rolled out).
>
> A work-around would be to de-normalize the 'a' property in your
> model :
>
> create two distinct properties to represent the value 'a' as 'a' and
> 'ab' and populate both with the same value. Then your query would be
> "a=x AND ab=y AND b=z AND c=t" which shouldn't need an custom index.
>
> You will incur the overhead of storing the extra property.
>
> On Nov 7, 1:13 am, ZS <[email protected]> wrote:
>
>
>
> > I have a query like
> > a=x AND a=y AND b=z AND c=t
> > and it is failing saying there is no suitable index. I thought all
> > equalities is always allowed? Does that not apply if there are two
> > equalities on the same property? Yet a=x AND a=y AND b=z  works ok so
> > what is the rule?
>
> > Thanks

-- 
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.

Reply via email to