Elasticsearch is a search server based on Lucene, which is an open source information-retrieval library. Elasticsearch provides a distributed full-text search engine with a RESTful web interface and schema-free JSON documents. In this recipe, we will implement full-text search using Elasticsearch for our Flask application.
Implementing full-text search with Elasticsearch
Getting ready
We will use a Python library called elasticsearch, which makes dealing with Elasticsearch a lot easier:
$ pip3 install elasticsearch
We also need to install the Elasticsearch server itself. This can be downloaded from https://www.elastic.co/downloads/elasticsearch. Unpack the package and run the following command:
$ bin/elasticsearch
This will...