Store the labels in a StringList http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#StringListProperty
Running queries to find entities with a particular value (label) in a list is easy http://code.google.com/appengine/docs/python/datastore/queries.html I am almost certain (long time since I tried) run queries that require two items (unread+custom label for example) in a list. Simple and powerful. In practice labels would rarely need renaming, either just fire off a "map-reduce" style background task to rename all the instances of a label. Or use a 'internal name' (eg the id of an Label entity) in the stringlist, and store the 'display' name in a Entity per label. On 14 April 2011 12:15, nischalshetty <[email protected]> wrote: > This has been asked a couple of times before but I haven't seen a > definite answer to it. What's the best way to build labels similar to > gmail on the Appengine? > > It would be similar to the way Labels work in Gmail. > > 1. Label will have many posts belonging to it > 2. Posts will have many labels > 3. One should be able to display all posts belonging to one or more > labels (or at least posts belonging to one label) > > Along with this, there's also the whole "read" and "unread" posts. So > one should know the posts belonging to a particular label that are > read as well as unread. > > We have to keep in mind that each label can have 1000's of posts while > each post can have a limited set of labels (say 20-50). > > -- > 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.
