Problem stop indexing data when I restart Elasticsearch?

Hello,
I indexing my data : everything fine, but when I restart Elasticsearch, he
reindex me my data, My problem is that I have twice the same data.
Can you help me to solve this problem ?

Thanks in advance.

My code :

PUT /my_index/_mapping/user
{
"mappings" : {
"user" : {
"properties" : {

        "name_user":{
            "type":"string"
        }

}
}
},

"settings" : {
"analysis" : {
"analyzer" : {
"str_search_analyzer" : {

      "tokenizer" : "standard",
      "filter" : ["lowercase", "asciifolding"]
    },

    "str_index_analyzer" : {
      "tokenizer" : "standard",
      "filter" : ["lowercase","asciifolding"]
    }
  },


}

}
}

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

"url" : "my_url",
"user" : "user",
"password" : "password",
"sql" : "select name_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5  

}
}

--
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/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

After you have indexed your data and all the work is done, you should
remove the river.

curl -XDELETE '0:9200/_river/user/'

Otherwise, the river will be automatically started again when the node
starts again.

Jörg

On Thu, May 15, 2014 at 2:59 PM, Tanguy Bernard <bernardtanguy1pro@gmail.com

wrote:

Hello,
I indexing my data : everything fine, but when I restart Elasticsearch, he
reindex me my data, My problem is that I have twice the same data.
Can you help me to solve this problem ?

Thanks in advance.

My code :

PUT /my_index/_mapping/user
{
"mappings" : {
"user" : {
"properties" : {

        "name_user":{
            "type":"string"
        }

}
}
},

"settings" : {
"analysis" : {
"analyzer" : {
"str_search_analyzer" : {

      "tokenizer" : "standard",
      "filter" : ["lowercase", "asciifolding"]
    },

    "str_index_analyzer" : {
      "tokenizer" : "standard",
      "filter" : ["lowercase","asciifolding"]
    }
  },


}

}
}

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

"url" : "my_url",
"user" : "user",
"password" : "password",
"sql" : "select name_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5

}
}

--
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/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%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/CAKdsXoHTejtO%3DOn-Bp_QEA-Jw4Lf0MNbUp80eQs%3DKniq9FWQqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thank you very much Jörg. It's work perfectly.

Tanguy

--
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/6991c45a-e716-4106-9e00-01ebe849941a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thank you very much Jörg. It works perfectly.

Tanguy

Le jeudi 15 mai 2014 15:17:04 UTC+2, Jörg Prante a écrit :

After you have indexed your data and all the work is done, you should
remove the river.

curl -XDELETE '0:9200/_river/user/'

Otherwise, the river will be automatically started again when the node
starts again.

Jörg

On Thu, May 15, 2014 at 2:59 PM, Tanguy Bernard <bernardt...@gmail.com<javascript:>

wrote:

Hello,
I indexing my data : everything fine, but when I restart Elasticsearch,
he reindex me my data, My problem is that I have twice the same data.
Can you help me to solve this problem ?

Thanks in advance.

My code :

PUT /my_index/_mapping/user
{
"mappings" : {
"user" : {
"properties" : {

        "name_user":{
            "type":"string"
        }

}
}
},

"settings" : {
"analysis" : {
"analyzer" : {
"str_search_analyzer" : {

      "tokenizer" : "standard",
      "filter" : ["lowercase", "asciifolding"]
    },

    "str_index_analyzer" : {
      "tokenizer" : "standard",
      "filter" : ["lowercase","asciifolding"]
    }
  },


}

}
}

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

"url" : "my_url",
"user" : "user",
"password" : "password",
"sql" : "select name_user from user",
"index" : "my_index",
"type" : "user",
"max_bulk_requests" : 5  

}
}

--
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/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%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/96290862-0d71-4d68-b4bc-f2fe73bb8ff6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.