How to achieve global analyzer per index


(Makeyang) #1

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?


(Xavier Facq) #2

Try using a template:

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

(system) #3