Adding custom analyzer to elasticsearch via grails plugin
<p>I'm trying to add a custom analyzer to elasticsearch via grails plugin. I was able to change the used analyzer to a common analyzer using "searchable" on the domain:</p>

<pre><code>static searchable = {
        all = [analyzer: 'snowball']
    }
</code></pre>

<p>but cannot get it to know a costum analyzer. It is unclear how to translate the following json in the REST API to a groovy closue:</p>

<pre><code>PUT /my_index
{
  "settings": {
    "analysis": {
      "filter": {
        "my_synonym_filter": {
          "type": "synonym", 
          "synonyms": [ 
            "british,english",
            "queen,monarch"
          ]
        }
      },
      "analyzer": {
        "my_synonyms": {
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "my_synonym_filter" 
          ]
        }
      }
    }
  }
}
</code></pre>

<p><a href="https://stackoverflow.com/questions/31756102/elasticsearch-groovy-index-template#">this</a> question seems to have the same problem but the answer doesn't work, and <a href="https://stackoverflow.com/questions/18188370/how-can-i-define-settings-and-analyzer-for-elasticsearch">this</a> answer suggests that it might not be possible, but that doesn't seem reasonable because setting a custom analyzer is pretty basic. </p>

<p>Any suggestions?</p>