5

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?

2 Answers 2

5

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.

0

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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