Skip to content

Upgrading from elasticsearch-6.5.4 to 6.6.0 breaks synonym_graph filter #38793

@weberhofer

Description

@weberhofer

Elasticsearch version 6.6.0

Plugins installed: []

JVM version (java -version): cat openjdk version "1.8.0_191"

OS version (uname -a if on a Unix-like system): Linux herkules 4.4.172-86-default #1 SMP Fri Feb 1 06:14:18 UTC 2019 (62e27f4) x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
I'm searching using synonym_graph with a list of synonyms. After upddating to 6.6.0 the synonym list seem to be ignored.

Steps to reproduce:
I have defined the following mapping:

{
	"settings": {
		"analysis": {
			"filter": {
				"graph_synonyms": {
					"type": "synonym_graph",
					"synonyms_path": "/var/lib/elasticsearch/synonyms.txt",
					"tokenizer": "standard",
					"ignore_case": true,
					"expand": true
				},
			},
			"analyzer": {
				"search_synonyms_case_insensitive": {
					"type": "custom",
					"tokenizer": "standard",
					"filter": [
						"asciifolding",
						"lowercase",
						"graph_synonyms",
						"standard"
					]
				}
			}
		}
	}
}
...

Sending the following query returns all results including the synonyms in 6.5.4 but only exact matches in 6.6.0:

{
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "query": "fgm",
            "fields": [
              "content"
            ],
            "analyze_wildcard": true,
            "phrase_slop": 1,
            "default_operator": "AND",
            "analyzer": "search_synonyms_case_insensitive"
          }
        }
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions