I am designing google datastore schema for the classic 'User Posts' and 'Tags' questions.
This page suggests Relation Index Entities model. Basically it puts searchable tags or keywords as list property in child entity for filtering, and the necessary properties in parent entity. To my understanding, this approach is to reduce serialization overhead at query time.
class Post(db.Model):
title = db.StringProperty()
post_date = db.DateTimeProperty()
class Tags(db.Model):
tags = db.StringListProperty()
mytags = Tags(parent=post, tags=many_tags)
- Given projection queries can get a subset of properties, is Relation Index Entities still necessary to reduce serialization overhead of list properties?
Note: projection query has limits; Relation Index Entity doesn't.
Does Relation Index Entities make query more difficult? Saying I want to filter on the post with tag 'cars' for the posts created within last 7 days. tags and post_date are in different kinds, is there an easy way to do that?
Regarding exploding indexes, does Relation Index Entities reduce the chance of exploding indexes, since it put list properties in different kinds?
Thanks for answering in advance.