In this chapter, we will cover the following recipes:
In the previous chapter, we saw how it is possible to use a native client to access the Elasticsearch server via Java. This chapter is dedicated to the Python language and how to manage common tasks via its clients.
Apart from Java, the Elasticsearch team supports official clients for Perl, PHP, Python, .NET, and, Ruby. (See the announcement post on the Elasticsearch blog at http://www.elasticsearch.org/blog/unleash-the-clients-ruby-python-php-perl/.) These clients have a lot of advantages over other implementations. A few of them are mentioned as follows:
"These clients are direct translations of the native Elasticsearch REST interface" - The Elasticsearch team
The Python client plays very well with other Python frameworks such as Django, web2py, and Pyramid. It allows very fast access to documents, indices, and clusters.
In this chapter, I'll try to describe the most important functionalities of the Elasticsearch official Python client; for additional examples, I suggest you to take a look at the online GitHub repository and documentation at the following URL: https://github.com/elastic/elasticsearch-py.
18.191.57.219