How manage insert and update sql (river)?

Hello,
I would like to know a way to manage INSERT and UPDATE ?
I am forced to delete and then re-index my data ?
Maybe there are a way to index again but without duplicate my data (INSERT)
?
Can you help with my problem ?

I use this :

PUT /_river/user/_meta
{
"type" : "jdbc",
"jdbc" : {

"url" : "jdbc:mysql://my_adress/my_index",
"user" : "my_user",
"password" : "my_password",
"sql" : "select name_user, firstname_user, id_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5  

}
}

Thanks in advance.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

If you use the column name _id, you can control the ID of the ES document
you created by SQL. If you do not use _id, a random doc ID is generated.

See the README at GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch

Jörg

On Thu, May 22, 2014 at 11:43 AM, Tanguy Bernard <
bernardtanguy1pro@gmail.com> wrote:

Hello,
I would like to know a way to manage INSERT and UPDATE ?
I am forced to delete and then re-index my data ?
Maybe there are a way to index again but without duplicate my data
(INSERT) ?
Can you help with my problem ?

I use this :

PUT /_river/user/_meta
{
"type" : "jdbc",
"jdbc" : {

"url" : "jdbc:mysql://my_adress/my_index",
"user" : "my_user",
"password" : "my_password",
"sql" : "select name_user, firstname_user, id_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5

}
}

Thanks in advance.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF%3DA0D%2BbMCz91sQ7e0ksQTx%2BgWe7wes0hf-We9enH7ByQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tank you Jörg, with _id this is a perfect solution.

Le jeudi 22 mai 2014 11:54:18 UTC+2, Jörg Prante a écrit :

If you use the column name _id, you can control the ID of the ES document
you created by SQL. If you do not use _id, a random doc ID is generated.

See the README at GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch

Jörg

On Thu, May 22, 2014 at 11:43 AM, Tanguy Bernard <bernardt...@gmail.com<javascript:>

wrote:

Hello,
I would like to know a way to manage INSERT and UPDATE ?
I am forced to delete and then re-index my data ?
Maybe there are a way to index again but without duplicate my data
(INSERT) ?
Can you help with my problem ?

I use this :

PUT /_river/user/_meta
{
"type" : "jdbc",
"jdbc" : {

"url" : "jdbc:mysql://my_adress/my_index",
"user" : "my_user",
"password" : "my_password",
"sql" : "select name_user, firstname_user, id_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5  

}
}

Thanks in advance.

--
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 <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ac1201f4-38ac-4b9f-bdc5-582df667ba49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Jörg,
I'm facing another problem with update! I'm looking for a solution for
updating document if they have changes. When i run my query:

curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://xyz.com:3306/my_test_river_es",
"user" : "user_name",
"password" : "pass_word",
"schedule" : "0 0-59 0-23 ? * *",
"sql" : "SELECT id AS _id, id , parent_id , name FROM
account_navi"
}
}'

Everything is working fine. The river insert for me the new document to ES
and it updates the documents every minutes. But I want to avoid, that ES
execute the update for existing document with no changes. When I take a
look at the ES. I see that river has updated all document.
Is there any solution for my case?
Thank you for any advice for the nice plugin
Ramy

Am Donnerstag, 22. Mai 2014 11:54:18 UTC+2 schrieb Jörg Prante:

If you use the column name _id, you can control the ID of the ES document
you created by SQL. If you do not use _id, a random doc ID is generated.

See the README at GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch

Jörg

On Thu, May 22, 2014 at 11:43 AM, Tanguy Bernard <bernardt...@gmail.com
<javascript:>> wrote:

Hello,
I would like to know a way to manage INSERT and UPDATE ?
I am forced to delete and then re-index my data ?
Maybe there are a way to index again but without duplicate my data
(INSERT) ?
Can you help with my problem ?

I use this :

PUT /_river/user/_meta
{
"type" : "jdbc",
"jdbc" : {

"url" : "jdbc:mysql://my_adress/my_index",
"user" : "my_user",
"password" : "my_password",
"sql" : "select name_user, firstname_user, id_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5  

}
}

Thanks in advance.

--
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 <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/2ae75640-f6e4-4b1f-9216-b4e667e53171%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/02791b38-c359-48e2-9188-97b5f0f1f8a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.