elasticsearch/elasticsearch-dsl-py — pull request #42 by dcwatson (2014-12-12 19:27:20+00:00)
Title: Inherit using and index from parent Meta, if possible

When subclassing documents, I think it makes sense to inherit ```Meta.index``` and ```Meta.using``` from the parent document, if they are defined. Of course this won't stop you from overriding them, but I wouldn't expect it to be required to do so.

I specifically excluded ```doc_type``` from being inherited, but could see it working either way. On one hand, this is a conservative default - it lets you fully separate the parent and the child docs when indexing. But it might make sense to inherit ```doc_type``` by default, too - you could index both in the same ES type without consequence (I think the parent would ignore the extra child fields), but perhaps more likely is the case when you don't care about the parent class at all.

In fact, in writing this, it occurs to me that maybe it's worth having a ```Meta.abstract``` option, but I don't know all the ramifications of adding that. Food for thought I guess :)