Elasticsearch Tutorial for MySQL Users
Don’t Be Afraid of Elasticsearch
This article is an Elasticsearch tutorial for MySQL users.
1. Imagine MySQL Tables and Records
Let’s say there are three tables:
Each of them have some records.
You can execute full text search for
activities.title as follows.
Let’s do the same thing as above with Elasticsearch.
2. Run Elasticsearch
On your memory-rich machine, run an official Docker image of Elasticsearch.
3. Create an Index
activities index. It is like a MySQL table.
4. Put Documents
activity documents to the index. These are similar to
5. Issue a Full Text Search Query
Now you can execute full text search to the index like a
SELECT ... MATCH() ... AGAINST statement.
You will get a result like the following.
Explore Elasticsearch reference to learn more details. Have a nice Elasticsearch life!