elasticsearch/elasticsearch-dsl-py — pull request #13 by robhudson (2014-08-18 15:57:33+00:00)
Title: Updated Search._clone to better support subclassing

I did this to support use-cases like the following:

```
from elasticsearch_dsl.search import Search as dslSearch
from statsd import statsd

class Search(dslSearch):

def execute(self):
with statsd.timer('search.execute'):
results = super(Search, self).execute()
statsd.timing('search.took', results.took)
return results
```

Previously anytime `_clone` got called it would return the original `Search` class, not the subclassed one.