Closed
Description
Elasticsearch version 6.3.0 (and before)
Plugins installed: none
JVM version: openjdk version "1.8.0_161"
OS version: openSUSE Leap 42.3
Description of the problem including expected versus actual behavior:
To search in within a text-field I'm using a QueryStringQuery with the following parameters:
{
"analyze_wildcard": true,
"auto_generate_phrase_queries": true,
"analyzer": "search_synonyms_case_insensitive",
"phrase_slop": 1,
"default_operator": "AND"
}
The following filter is defined:
"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"
]
}
The token lgbt is in our synonym list (and has various synonyms).
When we search including synonyms we get the following number of rows:
lgbt -> 15000
lgbt* -> 0
Without thesaurus we see more than 7.000 results no matter if we search "lgbt" or "lgbt*".
Is this the expected behavior? Users do not understand this behavior...