1

Can anyone please post working configuration of elastic search mysql JDBC River, doing automatic ES update when table contents change? Poll every 10 seconds and update if something changed would be fine too.

This one is probably duplicate, but I had no success with auto commit setting, suggested here: Fetching changes from table with ElasticSearch JDBC river

Community
  • 1
  • 1
resident
  • 101
  • 7
  • You should probably post your own configuration and people can help to correct any issues. – pickypg Mar 19 '14 at 16:50
  • 1
    Nobody wants to do your work for you. It both a) takes time and b) isn't the best way for you to learn. Make an attempt, and if it doesn't work then post what you have tried. Then people can try and help you resolve issues. – user2221125 Mar 20 '14 at 15:11

1 Answers1

2

this worked for me:

curl -XPUT 'localhost:9200/_river/yadda/_meta' -d '{
   "type" : "jdbc",
   "jdbc" : {
   "strategy" : "simple",
   "driver" : "com.mysql.jdbc.Driver",
   "url" : "jdbc:mysql://localhost:3306/yadda",
   "user" : "bla",
   "password" : "blabla",
   "sql" : "select bla from blabla",
   "index" : "bla_index",
   "type" : "bla_type",
   "schedule" : "0/10 * * ? * *",
   "max_retries": 3,
   "max_retries_wait" : "10s"
   }
}'
eliasah
  • 39,588
  • 11
  • 124
  • 154
resident
  • 101
  • 7