In App-Engine DataStore (which while based on BigTable isn't actully 'BigTable')
You have StringListProperties https://developers.google.com/appengine/docs/python/datastore/typesandpropertyclasses#StringListProperty So can just store the tag(s) in a string list property on your CONTENT model. No TC or TAG model! You can actully filter string lists, where an equality query actually says "where the list contains this value". (case 2) Can then do queries that look for entities, that contain this value AND this value (3) Can also combine one 'range' filter with such queries to do your (case 4) Luckily, you can also mostly avoid a historic problem with multi-list queries https://developers.google.com/appengine/articles/indexselection#Exploding_Search Basically you 'Normalize' the database. With a relational database you are used to denormalizing, don't do it with DataStore. With the datastore like this, you can't easily get a "list of all tags", with your RDMS could just query the TAG table. If need a list of tags, store that seperately. --- Also your TC.tag_key.IN, mentioned in the question. Looks for entities, with EITHER of the tags mentioned in the query. Not both. https://developers.google.com/appengine/docs/python/ndb/queries#repeated_properties -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
