How to set "index": "not_analyzed" While push data from Mysql using mysql-replicator

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

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 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 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 for that.

Daniel