# Elasticsearch JDBC River problem

**URL:** <https://discuss.elastic.co/t/elasticsearch-jdbc-river-problem/12381>\
**Category:** Elasticsearch\
**Created:** [June 12, 2013, 1:40pm UTC](https://discuss.elastic.co/t/elasticsearch-jdbc-river-problem/12381 "2013-06-12T13:40:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louis\_Bedard](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@Louis\_Bedard](https://discuss.elastic.co/u/Louis_Bedard)\
**Post date:** [June 12, 2013, 1:40pm UTC](https://discuss.elastic.co/t/elasticsearch-jdbc-river-problem/12381/1 "2013-06-12T13:40:17Z")

</div>

Hello,

I have a problem with JPrante JDBC river.

The first time the river runs it imports all the data in ES (296  
Documents or so), but on the second time "I think" for an unknown reason  
that the house keeper deletes all the documents even if the log said 0  
document deleted. The fact is that I have only 3 documents left after the  
second import.... Im wondering what i'm doing wrong...

I'm runnnig ES server 0.90, on a single node with jprante 2.2.1 river.

Any help will be appreciated!

--  
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).  
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:** [June 12, 2013, 1:43pm UTC](https://discuss.elastic.co/t/elasticsearch-jdbc-river-problem/12381/2 "2013-06-12T13:43:36Z")

</div>

Louis,

Could you run your select query on SQL and gist the results?  
I suspect that your query is returning the same id many times and so the river update the same document many time.

## HTH

David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 juin 2013 à 15:40, Louis Bedard [foutchy@gmail.com](mailto:foutchy@gmail.com) a écrit :

> Hello,
> 
> I have a problem with JPrante JDBC river.
> 
> The first time the river runs it imports all the data in ES (296 Documents or so), but on the second time "I think" for an unknown reason that the house keeper deletes all the documents even if the log said 0 document deleted. The fact is that I have only 3 documents left after the second import.... Im wondering what i'm doing wrong...
> 
> I'm runnnig ES server 0.90, on a single node with jprante 2.2.1 river.
> 
> Any help will be appreciated!
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> \<data.json\>\<mapping.json\>\<elasticsearch.log\>

---

<div class="post-metadata">

**Author:** ![Louis\_Bedard](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@Louis\_Bedard](https://discuss.elastic.co/u/Louis_Bedard)\
**Post date:** [June 12, 2013, 2:09pm UTC](https://discuss.elastic.co/t/elasticsearch-jdbc-river-problem/12381/3 "2013-06-12T14:09:33Z")

</div>

Hi,

I got some duplicated IDs but nothing near 3 distinct one. And your are  
right that \_version \> 1, In fact it's \> 1000

So now the question is, how could I avoid those duplicated ids and tell  
ES what to do with it ?

I joigned a subset of the resultset

Le mercredi 12 juin 2013 09:43:36 UTC-4, David Pilato a écrit :

> Louis,
> 
> Could you run your select query on SQL and gist the results?  
> I suspect that your query is returning the same id many times and so the  
> river update the same document many time.
> 
> ## HTH
> 
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 12 juin 2013 à 15:40, Louis Bedard \<[fou...@gmail.com](mailto:fou...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hello,
> 
> I have a problem with JPrante JDBC river.
> 
> The first time the river runs it imports all the data in ES (296  
> Documents or so), but on the second time "I think" for an unknown reason  
> that the house keeper deletes all the documents even if the log said 0  
> document deleted. The fact is that I have only 3 documents left after the  
> second import.... Im wondering what i'm doing wrong...
> 
> I'm runnnig ES server 0.90, on a single node with jprante 2.2.1 river.
> 
> Any help will be appreciated!
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> \<data.json\>\<mapping.json\>\<elasticsearch.log\>

--  
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).  
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:31am UTC](https://discuss.elastic.co/t/elasticsearch-jdbc-river-problem/12381/4 "2017-07-06T02:31:35Z")

</div>

Closed on July 6, 2017, 2:31am UTC


