Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Im trying to add some full text searching to my LAMP web application. Ive come across ElasticSearch and I like what it has to offer. I have read the guides and understand how to index a single item by using curl -XPUT http://localhost:9200/.

But how can I index an entire MySQL database? I cannot seem to find anywhere on the web that explains how to do this. Any ideas?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You have to mirror the parts you want searched in elastic search.. you just don't tell elastic search to index a mysql database.

Basically whatever gets put/changed/deleted in mysql also has to do the same in elastic search. You don't have to put all the info just what you want to search on and a way to link it to the mysql info.

share|improve this answer

You can use a river to pull data from your MySQL database.

GitHub: elasticsearch-river-jdbc

Installation instructions

But I've seen more recommendations to have your app push the data using bulk operations.

StackOverflow: How to index JSON web services into elasticsearch?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.