# How to set "index": "not\_analyzed" While push data from Mysql using mysql-replicator

**URL:** <https://discuss.elastic.co/t/how-to-set-index-not-analyzed-while-push-data-from-mysql-using-mysql-replicator/52718>\
**Category:** Elasticsearch\
**Created:** [June 14, 2016, 10:15am UTC](https://discuss.elastic.co/t/how-to-set-index-not-analyzed-while-push-data-from-mysql-using-mysql-replicator/52718 "2016-06-14T10:15:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajkumar\_E](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@Rajkumar\_E](https://discuss.elastic.co/u/Rajkumar_E)\
**Post date:** [June 14, 2016, 10:15am UTC](https://discuss.elastic.co/t/how-to-set-index-not-analyzed-while-push-data-from-mysql-using-mysql-replicator/52718/1 "2016-06-14T10:15:06Z")

</div>

I working on EFK, I push message from mysql to elsaticsearch using mysql-replicator, if i push data to elasticsearch add type field in each field

for example:

```
  "mappings": {
    "chat_chennaibox": {
        "properties": {
            "message": {
                "type": "string"
            }
}       

```

}  
}

I need to add "index": "not\_analyzed" in message field .

For Example:

```
    "mappings": {
    "chat_chennaibox": {
        "properties": {
            "message": {
                "type": "string",
                "index": "not_analyzed" 
            }
}       

```

}  
}

Suggest me How to do this? this is td-agent configration File: [http://pastebin.com/bBAgAgvz](http://pastebin.com/bBAgAgvz)

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [June 14, 2016, 11:34am UTC](https://discuss.elastic.co/t/how-to-set-index-not-analyzed-while-push-data-from-mysql-using-mysql-replicator/52718/2 "2016-06-14T11:34:04Z")

</div>

Hi @Rajkumar_E,

I fear this forum is not the right place for your question. I guess you talk about [https://github.com/y-ken/fluent-plugin-mysql-replicator](https://github.com/y-ken/fluent-plugin-mysql-replicator) and you probably should ask for help over there.

I glanced at the source code but it does not seem to create the mappings for you so I guess these are just the Elasticsearch defaults that it has detected when it indexed the first document.

Provided that my assumption is correct you can create a **new** index and use the [PUT mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) to create the mapping that you want (the mapping of existing fields cannot be changed). You have then to reindex the existing documents from the old index. If your are on Elasticsearch 2.3 or later you can use the [reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) for that.

Daniel

---

<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 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/how-to-set-index-not-analyzed-while-push-data-from-mysql-using-mysql-replicator/52718/3 "2017-07-05T22:43:58Z")

</div>


