IMO, I would think about what document type I want to search for.
Are you looking for Posts ? Comments ? I think that your need is to find posts and only that.
So, I would only index posts with all its fields (categories, comments, ...)
Each Time a new comment is added, just push again the full post to ES.
That's the way I will do it.
BTW it's difficult to stop thinking SQL in a NOSQL world. Things are differents and we don't need to split datas into relationnal documents.
Le 24 sept. 2011 à 02:51, goodieboy firstname.lastname@example.org a écrit :
I'm building a simple blog for myself as a way to learn ES. I have a pretty typical set of models, Post, PostTag, PostCategory, PostComment etc.. I'm wondering what the best way to store/index these models is -- specifically, with documents that are related to other types. Does ES handle sql-like joins with related documents? For example, would Comments be a separate type, or would they be nested within the Post from which they belong?
Apologies for the n00bness.