# Problem stop indexing data when I restart Elasticsearch?

**URL:** <https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533>\
**Category:** Elasticsearch\
**Created:** [May 15, 2014, 12:59pm UTC](https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533 "2014-05-15T12:59:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanguy\_Bernard](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Tanguy\_Bernard](https://discuss.elastic.co/u/Tanguy_Bernard)\
**Post date:** [May 15, 2014, 12:59pm UTC](https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533/1 "2014-05-15T12:59:45Z")

</div>

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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%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:** [May 15, 2014, 1:17pm UTC](https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533/2 "2014-05-15T13:17:04Z")

</div>

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](mailto: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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://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](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/CAKdsXoHTejtO%3DOn-Bp\_QEA-Jw4Lf0MNbUp80eQs%3DKniq9FWQqA%40mail.gmail.com](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](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tanguy\_Bernard](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Tanguy\_Bernard](https://discuss.elastic.co/u/Tanguy_Bernard)\
**Post date:** [May 15, 2014, 1:25pm UTC](https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533/3 "2014-05-15T13:25:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tanguy\_Bernard](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Tanguy\_Bernard](https://discuss.elastic.co/u/Tanguy_Bernard)\
**Post date:** [May 15, 2014, 1:27pm UTC](https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533/4 "2014-05-15T13:27:54Z")

</div>

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](mailto: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](mailto: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.com](https://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/c74975a9-71f1-4c40-a3de-b7907be2c401%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://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](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/96290862-0d71-4d68-b4bc-f2fe73bb8ff6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/96290862-0d71-4d68-b4bc-f2fe73bb8ff6%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:29am UTC](https://discuss.elastic.co/t/problem-stop-indexing-data-when-i-restart-elasticsearch/17533/5 "2017-07-06T01:29:09Z")

</div>


