Skip to content

Reload search analyzers does not work correctly with multiplexer filter (showstopper) #50554

Closed
@zdeseb

Description

@zdeseb

Elasticsearch version: Version: 7.5.1

Plugins installed: []

JVM version: 13.0.1

OS version: Windows 10 Pro

Description of the problem including expected versus actual behavior: When the synonym_graph filter is not used directly in an analyzer but is included in multiplexer filter (for example to allow combination with word_delimiter_graph), _reload_search_analyzers does not correctly find and reload appropriate analyzer.

Steps to reproduce:

  1. Create index
PUT /my_index
{
  "settings": {
    "index": {
      "analysis": {
        "analyzer": {
          "my_synonyms_only": {
            "tokenizer": "whitespace",
            "filter": [
              "synonym"
            ]
          },
          "my_synonyms": {
            "tokenizer": "whitespace",
            "filter": [
              "multiplexer"
            ]
          }
        },
        "filter": {
          "synonym": {
            "type": "synonym_graph",
            "synonyms_path": "analysis/synonyms.txt",
            "updateable": true
          },
          "delimiter": {
            "type": "word_delimiter_graph",
            "preserve_original": true
          },
          "multiplexer": {
            "type": "multiplexer",
            "filters": [
              "delimiter",
              "synonym"
            ]
          }
        }
      }
    }
  }
}
  1. Try to reload search analyzers
POST /my_index/_reload_search_analyzers
  1. Only the analyzer which uses synonym filter directly is updated. Analyzer with multiplexer is not.
  "reload_details" : [
    {
      "index" : "my_index",
      "reloaded_analyzers" : [
        "my_synonyms_only"
      ],
      "reloaded_node_ids" : [
        "ex70i64yRtar5gMPncOUTw"
      ]
    }
  ]

4. I would expect the my_synonyms analyzer to be reloaded also

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions