# Urgent

**URL:** https://discuss.elastic.co/t/urgent/18039
**Category:** Elasticsearch
**Created:** [June 11, 2014, 9:27am UTC](https://discuss.elastic.co/t/urgent/18039 "2014-06-11T09:27:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Sekrafi\_Ismail](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sekrafi\_Ismail](https://discuss.elastic.co/u/Sekrafi_Ismail)
#### Post date: [June 11, 2014, 9:27am UTC](https://discuss.elastic.co/t/urgent/18039/1 "2014-06-11T09:27:45Z")

</div>

Bonjour,

Je viens de travailler sur elasticsearch, j'ai récupéré les données à  
partir d'une base de données postgresql mais j'arrive pas de faire la  
suppression et la mise à jour des données avec elasticsearch.

Vous avez une idée svp ?

Merci d'avance.

Cordialement.

--  
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/d62c6697-4b8e-4e63-82ae-4491b3a1e667%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d62c6697-4b8e-4e63-82ae-4491b3a1e667%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [June 11, 2014, 9:32am UTC](https://discuss.elastic.co/t/urgent/18039/2 "2014-06-11T09:32:12Z")

</div>

Have you tried the "schedule" setting in JDBC river plugin?

> **[GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-jdbc#time-scheduled-execution-of-jdbc-river)**
>
> JDBC importer for Elasticsearch. Contribute to jprante/elasticsearch-jdbc development by creating an account on GitHub.

You can also try the feeder mode of the JDBC plugin, combined with cronjob  
from your crontab.

Best,

Jörg

2014-06-11 11:27 GMT+02:00 Sekrafi Ismail [ismail.sekrafi@gmail.com](mailto:ismail.sekrafi@gmail.com):

> Bonjour,
> 
> Je viens de travailler sur elasticsearch, j'ai récupéré les données à  
> partir d'une base de données postgresql mais j'arrive pas de faire la  
> suppression et la mise à jour des données avec elasticsearch.
> 
> Vous avez une idée svp ?
> 
> Merci d'avance.
> 
> Cordialement.
> 
> --  
> 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/d62c6697-4b8e-4e63-82ae-4491b3a1e667%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d62c6697-4b8e-4e63-82ae-4491b3a1e667%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/d62c6697-4b8e-4e63-82ae-4491b3a1e667%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d62c6697-4b8e-4e63-82ae-4491b3a1e667%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoGk3PVduAe%2BdGSyfoP4aF9mYQ-0Hy5s1rkKXTc6eetGNQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGk3PVduAe%2BdGSyfoP4aF9mYQ-0Hy5s1rkKXTc6eetGNQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Sekrafi\_Ismail](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sekrafi\_Ismail](https://discuss.elastic.co/u/Sekrafi_Ismail)
#### Post date: [June 11, 2014, 10:02am UTC](https://discuss.elastic.co/t/urgent/18039/3 "2014-06-11T10:02:45Z")

</div>

> Merci pour votre réponse Jorg Prante.

Oui je l'ai essayé mais ça n'a pas marché ! voila qu'est ce que j'ai mis .

> curl -XPUT 'localhost:9200/\_river/dossiersexemp/\_meta' -d '  
> {  
> "type" : "jdbc",  
> "jdbc" : {
> 
> ```
> "index" : "i_dossiersexemp",
> "type" : "t_dossiersexemp",
> "driver" : "postgresql-9.2-1002.jdbc4.jar",
> "url" : "jdbc:postgresql://localhost:5432/alyse",
> "user" : "postgres",
> "password" : "",
> "sql" : "SELECT * FROM dossierexemp",
> "strategy" : "simple",
> "schedule": "0 0-59 0-23 ? * *" }
> 
> ```
> 
> }'

--  
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/b25cd836-a4e8-4481-b93c-c54ff2cd5fae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b25cd836-a4e8-4481-b93c-c54ff2cd5fae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 11, 2014, 1:23pm UTC](https://discuss.elastic.co/t/urgent/18039/4 "2014-06-11T13:23:51Z")

</div>

Hi Sekrafi,

Please follow some guidelines about this forum:

- Use a good title for your thread. Urgent does not mean anything. "JDBC river is not removing documents" could be better.
- Speak english. If you need to speak french, look at the FR ML: [https://groups.google.com/forum/#!forum/elasticsearch-fr](https://groups.google.com/forum/#!forum/elasticsearch-fr)

Some other details could be found here: [http://www.elasticsearch.org/help/](http://www.elasticsearch.org/help/)

Thanks!

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

Le 11 juin 2014 à 14:46:15, Sekrafi Ismail ([ismail.sekrafi@gmail.com](mailto:ismail.sekrafi@gmail.com)) a écrit:

Merci pour votre réponse Jorg Prante.

Oui je l'ai essayé mais ça n'a pas marché ! voila qu'est ce que j'ai mis .

curl -XPUT 'localhost:9200/\_river/dossiersexemp/\_meta' -d '  
{  
"type" : "jdbc",  
"jdbc" : {

```
    "index" : "i_dossiersexemp",
    "type" : "t_dossiersexemp",
    "driver" : "postgresql-9.2-1002.jdbc4.jar",
    "url" : "jdbc:postgresql://localhost:5432/alyse",
    "user" : "postgres",
    "password" : "",
    "sql" : "SELECT * FROM dossierexemp",
    "strategy" : "simple",
    "schedule": "0 0-59 0-23 ? * *" }

```

## }'

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/b25cd836-a4e8-4481-b93c-c54ff2cd5fae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b25cd836-a4e8-4481-b93c-c54ff2cd5fae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/etPan.53985867.74b0dc51.6c21%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53985867.74b0dc51.6c21%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Sekrafi\_Ismail](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sekrafi\_Ismail](https://discuss.elastic.co/u/Sekrafi_Ismail)
#### Post date: [June 12, 2014, 8:21am UTC](https://discuss.elastic.co/t/urgent/18039/5 "2014-06-12T08:21:07Z")

</div>

Thanks\* David Pilato\*,

I found the solution for delete and select, but it remains that update you  
have a solution?

Here is the solution for delete and select :

_Delete :_

curl -XDELETE 'localhost:9200/i\_dossiers/\_query?pretty=true' -d ' {"query":  
{"term": {"dos\_id":"985353",  
"dos\_sficdos":"1210070141","dos\_numpatient":"170879"}}}'

_Select :_

curl -XGET [http://localhost:9200/i\_dossiers/\_search?pretty=true](http://localhost:9200/i_dossiers/_search?pretty=true) -d  
'{"query":{"term":{"dos\_id":"985353"}}}'

--  
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/cbe914ad-909d-494d-9fde-8437a0970595%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cbe914ad-909d-494d-9fde-8437a0970595%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:23am UTC](https://discuss.elastic.co/t/urgent/18039/6 "2017-07-06T01:23:06Z")

</div>


