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?

CraigH
  • 195
  • 2
  • 7

2 Answers2

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.

Mike
  • 21,910
  • 7
  • 55
  • 79
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?

Atav32
  • 101
  • 3