Search code examples
elasticsearchsnowballanalyzer

Why "snowball" analyser was removed in Elasticsearch 5.1


I had Elasticsearch 2.4 and many of my indexes where using "snowball" analyzer, however today I updated to 5.1 and this analyzers stop working, Why did they where removed and how to convert my "snowball" analyzers to the equivalent in 5.1?


Solution

  • The main reason was because the snowball analyzer has been removed in Lucene 5 and replaced by the english analyzer (more info here)

    The snowball token filter is still there, though, so nothing prevents you from building a custom analyzer mimicking the snowball analyzer:

    {
      "settings": {
        "analysis": {
          "analyzer": {
            "my_snowball": {
              "type": "custom",
              "tokenizer": "standard",
              "filter": ["standard", "lowercase", "stop", "snowball"]
            }
          }
        }
      }
    }