Caused by: java.lang.NullPointerException: Cannot invoke \"org.elasticsearch.index.analysis.AnalyzerComponents.getCharFilters()\" because \"components\" is null

Hi there,
I get an issue with _reload_search_analyzers

I simply try to reload a synonym file but it doesn't reload it, no error, just the new file is not taken into account.

So I tried the old way, closing and re-opening the index and I get this error:

org.elasticsearch.ElasticsearchException$1: Cannot invoke \"org.elasticsearch.index.analysis.AnalyzerComponents.getCharFilters()\" because \"components\" is null"

My config:

"analyzer": {
        "synonym": {
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "kstem",
            "synonyms"
          ]
        }
      },
      "filter": {
        "synonyms": {
          "type": "synonym",
          "synonyms_path": "synonyms/all.txt",
          "updateable": true
        }
      },

The synonym analyzer is used on search_analyzer for a completion type and on standard text field. It only fails with the completion type:

  "suggest": {
    "type": "completion",
    "analyzer": "simple",
    "search_analyzer": "synonym"
  },

Tried on 7.3.2 7.8.0 7.8.1 and 7.9.3

Hi,

let me see if I can help.

Where do you see this error and when? Directly after reopening or after searching/indexing again? Is there anything else in the error message? Can you find any longer stack traces in the elasticsearch logs that relate to this error? It would be interesting to see where the exception actually happens.

If the synonym file isn't super large, can you add it here? What parts of it are you adding that you don't see being used after the reload? Does the rest (the synonyms from the "old" file") still work?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.