Add a certain analyser to all indexes called blah*


(somerandomguy) #1

Hi. I have a requirement to add a certain email analyser to all indexes that start with the word 'blah'.

This is the email analyser: from here: https://github.com/imotov/elasticsearch-test-scripts/blob/master/email_default_analyzer.sh

 "settings" : {
    "index": {
      "analysis" :{
        "analyzer": {
          "default": {
            "type" : "custom",
            "tokenizer" : "uax_url_email",
            "filter" : ["standard", "lowercase", "stop"]
        }
      }
    }
  }
}

Does anybody have any examples that I could work off?

Thanks.


(Daniel Mitterdorfer) #2

Hi @somerandomguy,

that's the perfect use case for index templates.

Daniel


(system) #3