Different behaviour of query_string on elasticsearch v5.6.13 and v6.4.3

Hi,

Please perform the following steps to regenerate the issue -

Create a test index with following settings on v6.4.3 and v5.6.13 (remove settings.index.max_ngram_diff)

PUT test
{
"mappings": {
"string": {
"properties": {
"name": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"analyzer": "str_index_analyzer",
"search_analyzer": "str_search_analyzer"
}
}}},
"settings": {
"index": {
"max_ngram_diff": "30",
"number_of_shards": "1",
"analysis": {
"filter": {
"substring": {
"type": "nGram",
"min_gram": "2",
"max_gram": "26"
}
},
"analyzer": {
"str_index_analyzer": {
"filter": [
"lowercase",
"substring"
],
"tokenizer": "standard"
},
"str_search_analyzer": {
"filter": [
"lowercase"
],
"tokenizer": "standard"
}
}
},
"number_of_replicas": "0"
}
}
}

Sync this data set on both version indices -

PUT test/string/1
{
"name": "S S FASHION"
}

PUT test/string/2
{
"name": "S S S S"
}

Check results of -

GET test/_search
{
"query": {
"query_string": {
"query": "name:S S"
}
}
}

GET test/_search
{
"query": {
"match": {
"name": "S S"
}
}
}

Why query_string gave result set on v5.6.13 and not v6.4.3 and on v5.6.13 why match query failed then?

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