I'd like to be able to find all Articles that contain certain words
and have been tagged by a given user.

Is there a good App Engine way to do this?

I started down this path:
- Articles are db.Searchable entities
- Each user tag creates a new UserTag entity
     userID : db.UserProperty
     article : db.ReferenceProperty(Article,
                     collection_name='user_tags')
     other props about the given user tag (date, stars, etc.)
- At query time, find all articles that contain the keywords and
  are referenced by a UserTag for userID

First, is there a better way to do this?

If not, my problem is enforcing the query constraint.  For this to
work, I think UserTag must have a key_name that includes the userID,
say, userID_articleID.  But how do I actually phrase the query?
- Article.all().search(words).filter('user_tags >',
   userID+'_').filter('user_tags <', userID+'z').fetch(100)

But this won't work because those are key_names, not
keys.  Any ideas?

[Sorry for the repost: my first version is not findable]
--~--~---------~--~----~------------~-------~--~----~
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