Elasticsearch And Python
Python Clients#
What is the python client to use?
- Low level client (close to http) - elasticsearch
- High level client (abstracted into models) - elasticsearch-dsl
Create an Index#
# Define a default Elasticsearch client
connections.create_connection(hosts=['localhost'])
# Create index
test_index = Index(name='test')
test_index.create()
Checking things with HTTP#
https://{host}:{port}/_cat/indices