Elasticsearch 6 中 simple_query_string 查询行为的更改
Changes to simple_query_string query behavior in Elasticsearch 6
从 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 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。