How to achieve global analyzer per index

try this one:
put twitter2' -d' {
"index" : {
"analysis" : {
"analyzer" : {
"default" : {
"type" : "keyword"
}
}
}
},
"mapping": {}
}

and it won't work.
can anyone show me how to achieve so?

Try using a template:

{
    "template" : "your-index-names-*",
    "settings" : {
        "analysis": {
            "analyzer": {
                "default": {
                    "type": "keyword"
                }
            }
    }
    ...
}