I would suggest that there is no reason to speak directly with Elasticsearch when the official Python client is available. The Python client does a lot of hard work for you - otherwise you will spend a lot of time and effort converting Python data to ES and vice versa.
Regarding the choice between elasticsearch-dsl-py and elasticsearch-py :
elasticsearch-dsl-py is a wrapper only for Query DSL (plus a few other things). It does not provide access to the entire Elasticsearch API (e.g., Cluster API , Index APIs , Bulk APIs , etc.). The docs say:
To use other Elasticsearch APIs (such as cluster health), simply use the primary client.
It is very likely that you will need to use both libraries in any large application. elasticsearch-dsl-py itself uses elasticsearch-py .
I agree with your comment about Haystack - this Elasticearch backend is poor.
source share