# River - Mysql to elasticsearch

**URL:** <https://discuss.elastic.co/t/river-mysql-to-elasticsearch/14924>\
**Category:** Elasticsearch\
**Created:** [December 18, 2013, 6:35am UTC](https://discuss.elastic.co/t/river-mysql-to-elasticsearch/14924 "2013-12-18T06:35:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohit\_Kumar](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@mohit\_Kumar](https://discuss.elastic.co/u/mohit_Kumar)\
**Post date:** [December 18, 2013, 6:35am UTC](https://discuss.elastic.co/t/river-mysql-to-elasticsearch/14924/1 "2013-12-18T06:35:40Z")

</div>

Hi folks,  
I am trying create river for mysql to elasticsearch. I have successfully  
created that but data is not mapping dynamically. when I restart the  
elasticsearch then the changes in data visible.  
for - example :-  
step 1 : In mysql database table "tbl\_test" has 3 row and 3 column.  
step 2 : when i start the Elastic search I got 3 document.  
step 3 : now i add 2 rows in tbl\_test (total 5 rows and 3column.)  
step 4 : elasticsearch it is showing only 3 documents. but when I restart  
elasticsearch it is showing all documents that is 5 documents.

Below is my the query :  
{  
"type": "jdbc",  
"jdbc": {  
"driver": "com.mysql.jdbc.Driver",  
"url": "jdbc:mysql://localhost:3306/test",  
"user": "root",  
"password": "admin",  
"sql": "select \* from tbl\_test",  
"index": "mySql\_index",  
"type": "mySql\_indext",  
"bulk\_size": "100",  
"bulk\_timeout": "10ms",  
"strategy": "simple"  
}  
}

_Question:_  
how can I achieve this dynamically.

I am using Elasticsearch version 0.90.7 and river-jdbc ( version - 2.3.1 )

thanks in advance...!!!

Regrads  
Mohit Kumar Yadav  
(MCA/BBA)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAK6eDKfnHYyeWh\_JzW7WQ2iQfBvymkQJpT\_FKatT2ytMsrw%3Dcw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAK6eDKfnHYyeWh_JzW7WQ2iQfBvymkQJpT_FKatT2ytMsrw%3Dcw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 18, 2013, 6:40am UTC](https://discuss.elastic.co/t/river-mysql-to-elasticsearch/14924/2 "2013-12-18T06:40:48Z")

</div>

Have a look at [https://github.com/jprante/elasticsearch-river-jdbc/wiki/Strategies#simple-strategy](https://github.com/jprante/elasticsearch-river-jdbc/wiki/Strategies#simple-strategy)  
the poll time value can be adjusted to the interval how often data should be fetched.

## HTH

David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 18 déc. 2013 à 07:35, Mohit Kumar Yadav [mohit.kumar.ngi@gmail.com](mailto:mohit.kumar.ngi@gmail.com) a écrit :

Hi folks,  
I am trying create river for mysql to elasticsearch. I have successfully created that but data is not mapping dynamically. when I restart the elasticsearch then the changes in data visible.  
for - example :-  
step 1 : In mysql database table "tbl\_test" has 3 row and 3 column.  
step 2 : when i start the Elastic search I got 3 document.  
step 3 : now i add 2 rows in tbl\_test (total 5 rows and 3column.)  
step 4 : elasticsearch it is showing only 3 documents. but when I restart elasticsearch it is showing all documents that is 5 documents.

Below is my the query :  
{  
"type": "jdbc",  
"jdbc": {  
"driver": "com.mysql.jdbc.Driver",  
"url": "jdbc:mysql://localhost:3306/test",  
"user": "root",  
"password": "admin",  
"sql": "select \* from tbl\_test",  
"index": "mySql\_index",  
"type": "mySql\_indext",  
"bulk\_size": "100",  
"bulk\_timeout": "10ms",  
"strategy": "simple"  
}  
}

Question:  
how can I achieve this dynamically.

I am using Elasticsearch version 0.90.7 and river-jdbc ( version - 2.3.1 )

thanks in advance...!!!

Regrads  
Mohit Kumar Yadav  
(MCA/BBA)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAK6eDKfnHYyeWh\_JzW7WQ2iQfBvymkQJpT\_FKatT2ytMsrw%3Dcw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAK6eDKfnHYyeWh_JzW7WQ2iQfBvymkQJpT_FKatT2ytMsrw%3Dcw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/67D07329-5944-49DE-9C8A-B3624F42DE12%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/67D07329-5944-49DE-9C8A-B3624F42DE12%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:00am UTC](https://discuss.elastic.co/t/river-mysql-to-elasticsearch/14924/3 "2017-07-06T02:00:29Z")

</div>


