Elasticsearch is a distributed search and analytics system with lots of use cases. You can learn lots about Elasticsearch in the docs, or dive right in to the query DSL. There's also a nice intro webinar. Since this quick tour uses Python, you'll also want to have the Python Elasticsearch client docs handy.
This tutorial assumes that you're using Python 3.x, that you've cloned this Git repo, and that you've run
pip install -r requirements.txt --upgrade from this project directory.
Feel free to open issues if (when) you find any!
- Use Elastic Cloud to spin up an Elasticsearch cluster
- Connect to the Elasticsearch cluster and explore a couple of its APIs
- Load some data from a sample .csv file
- (TODO) Explore the /_search API
- (TODO) Finally, we'll see some of the visualization/dashboard capabilities built into the Kibana application.
Head over to Elastic Cloud. Sign up. Use the free trial.
Create a deployment. The web UI will show you progress on spinning up your cluster, and it will provide you with
some important information: your Elasticsearch URL, your Kibana URL, and your username/password.
Keep these things handy.
Now is also a good time to say that you can run Elasticsearch and Kibana for free on your own machine. While it's not hard to get started, that's outside the scope of this tutorial. Refer to Installation to get started if you want to run the software locally.
Read (the source!) and run python ./scripts/talking_to_cloud.py from your terminal. It'll ask for your connection
credentials and walk through an interactive-ish couple of quick API calls to your Elasticsearch cluster. This script
is heavily annotated to support the interactive experience.
Read and run python ./scripts/index_geonames.py. It indexes a sample of data from
Geonames for Iceland. (The sample being in ./sample_data.) It's a
drop-in replacement for the actual geonames files, so you could extend this demo to index much more data into your
Elasticsearch cluster. (Hint: if you want to index more data, check out the docs for
bulk helpers.) When you're done in
Python, head over to your Kibana instance and set up some maps. How is population distributed geographically in
Iceland?