Indexing Mysql Database with elasticsearch
Solution 1
There is no native support (at this time) for mysql in Elastic Search like there is in Sphinx.
Elastic Search is a great option for search, but you'll have probably to do some custom work to trigger reindexing of items when they change in your database. Exactly how that is accomplished will depend alot on your application. Elastic Search has great near real time search functionality, and has been proven to perform well under heavy indexing load so triggering reindexing shouldn't a concern for most applications.
The NoSQL movement seems to gaining steam as well. Some applications use Elastic Search as the only data store.
Solution 2
https://github.com/jprante/elasticsearch-river-jdbc does that. You can syncronize data from mysql source, using an "operations table".
It,s a little bit tricky first time installing, but it works.
First you have to install the plugin Second, you have to set up ( configure) the imported data
Comments
-
Mohit Jain almost 2 years
I recently started looking ElasticSearch to implement search in my application. I have my database in Mysql which have approx. >2 mn records. I know in sphinx we could create an index directly on any mysql table column. I wanted to know if its possible in Elasticsearch, if not directly how we could implement that?
Thanks Mohit
-
coderman about 10 years@catalinux (below) is correct, github project he mentioned allows moving of tables from mySQL to elasticSearch
-
Andy over 9 years@coderman - the OP is asking about native support, like Sphinx. River JDBC is a poller that is a very useful for replication, but it's not native support.
-
Debabrata Nayak almost 8 yearsDon't go for downloading river and all.it will create headache. Use Logstash to input data into elastic search. This will help you definitely.