A query with 'IN' is translated behind the scene as separate queries.
You can perform them yourself
result = []
for kw in keywords:
result.extend(Article.all(keys_only=True).filter('keywords =',
kw).fetch(10))
if len(result)>=10: break
result = result[:10]
2010/11/9 风笑雪 <[email protected]>:
> When I run this query:
> Article.all(keys_only=True).filter('keywords IN', keywords).fetch(10)
>
> It raise a BadQueryError: Keys only queries do not support IN filters.
> http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/ext/db/__init__.py#2197
>
> But I can't find this restriction in document:
> http://code.google.com/intl/en/appengine/docs/python/datastore/queriesandindexes.html#Restrictions_on_Queries
>
> ----------
> keakon
>
> --
> 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.
>
>
--
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.