我怎样才能逃脱“。”火炮中的字符以防止嵌套?

How can I escape "." characters in Artillery to prevent nesting?

我有一个火炮文件,其中我的一个请求是这样定义的:

{
  "post": {
    "url": "/apps/stash/foo/search",
    "json": {
      "size": 100,
      "from": 0,
      "query": {
        "bool": {
          "must": {
            "nested": {
              "path": "text_analytics.entities.person",
              "query": {
                "bool": {
                  "must": {
                    "match": {
                      "text_analytics.entities.person.text": "Boris Johnson"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

然而,当我运行这个请求时,发出的json是这样的:

{
  "json": {
    "size": 100,
    "from": 0,
    "query": {
      "bool": {
        "must": {
          "nested": {
            "path": "text_analytics.entities.person",
            "query": {
              "bool": {
                "must": {
                  "match": {
                    "text_analytics.entities.person.text": "Boris Johnson",
                    "text_analytics": {
                      "entities": {
                        "person": {
                          "text": "Boris Johnson"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

如您所见,它向名为 text_analyticsmatch 对象添加了一个键,它通过拆分 . 字符自动嵌套对象。

我怎样才能阻止大炮这样做?

看起来这实际上是火炮中的一个错误。

https://github.com/artilleryio/artillery/issues/723