Elasticsearch is a near real-time search server based on Lucene. It allows to create a distributed full-text search engine. It’s an opensource software developed in Java. It offers REST api in order to insert, retrieve and search data.
I have already installed a Mysql server and an Elasticsearch server, you can find several documentation on internet about installation of these software.
This image show the entity relationship model of this database.
Step 1
The following text box shows the command used to import the example database in mysql
Step 2
Download the elasticsearch-jdbc library and create the script “mysql-import-world.sh” showed in the following text box and run it in order to import the data from Mysql to Elasticsearch.
The script contains several parameter:
Mysql database connection data (ip, port, database name, username, passowrd)
SQL query executed in order to extract the data. In my example I use this query:
Elastic search connection data (ip, port)
The name of the index created on Elasticsearch
Step 3
Finally execute a query to the Elasticsearch server in order to verify that the new index world has been created and a second query in order to retrieve some articles from this index.
There are also some software like Kibana and Graphana providing a dashboard really useful to query an elasticsearch server and show the data in a web interface.
This post describe how generate the “System currency” report in Red Hat Satellite 6.
System currency report is a report existing in Satellite 5 but it isn’t ...
This post describe a GitHub Actions workflow that allow to create new post on a Jekyll web site contained in a GitHub repository using the issue editor of Gi...