How to model this relationship in ES?

Not that I know of. And I'm using 0.19.2.

In fact, I have to do this:
doc = connection.get(index_name, doc_type, id) # to retrieve the old content
.. update its comments list.
connection.delete(index_name, doc_type, id) # delete before reindex
connection.index(doc, index_name, doc_type, id) # actually I'm using bulk data write, not single doc write

The above get/delete/index is done at client-side - very inefficient IMO.

I'm still waiting for a ES server-side update feature(similar to Mongo's) where we sent only the delta's. I don't believe this feature is there yet - would love to be corrected here :slight_smile:

EDIT: I read up more on 0.19 features and found the Update API - http://www.elasticsearch.org/guide/reference/api/update.html I posted another post for pyes bindings. So, I take back what I said above about server-side update. But the entire doc will be reindexed(which is expected).