On Jan 25, 11:17 pm, ryan <[email protected]> wrote:
> On Jan 25, 11:43 am, Anthony <[email protected]> wrote:
>
> > If you store the tags as a StringList wouldn't this query work..
>
> > WHERE tags = tag1 AND tags IN [tag2,tag3] AND tags != tag4
>
> > From the docs it says the IN & != do run multiple queries behind the
> > scenes so not sure if it will be as quick as running it in memory for
> > a few hundred items, but if you need more than a few hundred items you
> > are not going to be able to do it in memory before it starts timing
> > out.
>
> good call, anthony! that query does indeed do what george wants, and
> you're right about how != and IN work behind the scenes.
>
> the problem with that query, unfortunately, is that it needs this
> index:
>
> - kind: Foo
>   properties:
>   - name: tags
>   - name: tags
>   - name: tags
>
> ...which is almost certain to explode on entities with any more than a
> handful of tags:
>
> http://code.google.com/appengine/docs/python/datastore/queriesandinde...

Very cool! On average I won't have more than 2-3 tags per item, so I
really think this solution might work! I'll try it and report back the
results.


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