从 Elasticsearch 5.6.8 升级到 6.2.4 后,我注意到 simple_query_string 的行为发生了变化,我似乎无法在重大更改中找到相关记录。如果针对两个版本运行以下命令,您将看到“Test *”将与 5 中的“Test Value”匹配,但在版本 6 中不再匹配。我是否遗漏了升级说明中的某些内容,有没有办法复制6.X 中的 5.X 行为?
PUT test_query
{
"mappings": {
"test_type": {
"properties": {
"my_field": {
"type": "text",
"analyzer": "standard"
}
}
}
}
}
POST /test_query/test_type
{
"my_field": "Test Value Here"
}
GET test_query/_search
{
"query": {
"simple_query_string": {
"fields": [
"my_field"
],
"query": "Test *",
"default_operator": "and"
}
}
}
最佳答案
这是一个错误,将在未来的版本中修复 https://github.com/elastic/elasticsearch/pull/28871 .
关于elasticsearch - Elasticsearch 6 中对 simple_query_string 查询行为的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50727081/