0

I am trying to install Hunspell Stemming Dictionaries for AWS ElasticSearch v7.10

I have done this previously for a classic unix install of ElasticSearch, which involved unzipping the latest .oxt dictionary file

Copying these files to the expected filesystem path:

  • ./config/hunspell/{lang}/{lang}.aff + {lang}.dic

The difference is that AWS ElasticSearch doesn't have backend filesystem. I have assumed we are supposed use S3 instead. I have created a bucket with this file layout and think I have successfully given it public read-only permissions.

My ElasticSearch schema contains the following analyser

{
  "settings": {
    "analysis": {
      "analyzer": {

        //***** Stemmers *****//
        // DOCS: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-hunspell-tokenfilter.html
        "hunspell_stemmer_en_GB": {
          "type":   "hunspell",
          "locale": "en_GB",
          "dedup":  true,
          "ignore_case": true, 
          "dictionary": [
            "s3://hunspell/en_GB/en_GB.aff",
            "s3://hunspell/en_GB/en_GB.dic",
          ]
        }
     } 
  }
}

But mapping PUT command is still returning the following exception

"type": "illegal_state_exception",
"reason": "failed to load hunspell dictionary for locale: en_GB",
"caused_by": {
"type": "exception",
  "reason": "Could not find hunspell dictionary [en_GB]"
}

How do I configure Hunspell for AWS ElasticSearch?

James McGuigan
  • 7,542
  • 4
  • 26
  • 29

0 Answers0