Can't get _reload_search_analyzers to reload search analyzers

I'm trying to update my synonyms file and I'm using the _reload_search_analyzers API as documented here:

However, it doesn't seem to be reloading my search analyzer. I see a reload log entry but nothing that references the specific analyzer, and the response to the API call doesn't mention the analyzer as it should, and most importantly the synonym changes aren't taking effect. The synonyms that exist prior to my attempt to reload are working right and the new synonyms take effect after restarting the node.

Here's some details:

Mapping:

{
  "idx-name" : {
    "mappings" : {
      "properties" : {
        "name" : {
          "type" : "search_as_you_type",
          "doc_values" : false,
          "max_shingle_size" : 3,
          "analyzer" : "default",
          "search_analyzer" : "synonym"
        }
      }
    }
  }
}

Settings:

{
  "idx-name" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "number_of_shards" : "1",
        "provided_name" : "idx-name",
        "creation_date" : "1633555026980",
        "analysis" : {
          "filter" : {
            "synonym" : {
              "type" : "synonym",
              "synonyms_path" : "analysis/synonyms.txt",
              "updatable" : "true"
            }
          },
          "analyzer" : {
            "synonym" : {
              "filter" : [
                "lowercase",
                "synonym"
              ],
              "tokenizer" : "whitespace"
            }
          }
        },
        "number_of_replicas" : "1",
        "uuid" : "amM6jvpdTqWykGVCHBhsBw",
        "version" : {
          "created" : "7130099"
        }
      }
    }
  }
}

API response:

POST /idx-name/_reload_search_analyzers
{
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "reload_details" : [
    {
      "index" : "idx-name",
      "reloaded_analyzers" : [ ],
      "reloaded_node_ids" : [
        "GVW3GnF5QkC3KOuaJRnOBw"
      ]
    }
  ]
}

Log entry:

{"type": "server", "timestamp": "2021-10-06T21:31:36,568Z", "level": "INFO", "component": "o.e.i.m.MapperService", "cluster.name": "docker-cluster", "node.name": "aae21bcaef6f", "message": " [idx-name] reloading search analyzers", "cluster.uuid": "WqmGUDv9RZ2mTnUGSvdHzw", "node.id": "GVW3GnF5QkC3KOuaJRnOBw"  }

Am I doing something wrong? For what it is worth, the "settings" API is returning "updateable": "true" but I am passing a real boolean when creating the index per the docs.

I'm running ES 7.15.0 in a single-node configuration inside a docker container.

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