3

从 Elasticsearch 5.6.8 升级到 6.2.4 后,我注意到 simple_query_string 的行为发生了变化,我似乎在重大更改中找不到记录。如果您对两个版本运行以下命令,您将看到“测试 *”将匹配 5 中的“测试值”,但不再匹配版本 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"
    }
  }
}
4

1 回答 1

2

这是一个错误,将在未来的版本中修复https://github.com/elastic/elasticsearch/pull/28871

于 2018-06-07T12:20:14.810 回答