0

在定义的规范文件下方,我想在“路径”中添加更多值:{$match} 函数。我的意思是我需要在这种语法中定义多个路径,这可能吗?即:Test/dev、Test/qa、Test/prod 等。

  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "Testing",
          "path": {"$match":"Test/dev"},
          "name": {"$match":"*"},
          "type": "file",
          "$or": [
            {
              "$and": [
                {
                  "created": { "$before":"90d" }
                }
              ]
            }
          ]
        }
      }
    }
  ]
}
4

1 回答 1

0

您可以将它们添加到“或”子句中:

{
  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "Testing",
          "name": { "$match": "*" },
          "type": "file",
          "created": { "$before": "90d" },
          "$or": [{ "$match": "Test/dev" }, { "$match": "Test/qa" }]
        }
      }
    }
  ]
}

阅读更多:

  1. AQL 文档
  2. 使用文件规范
于 2021-07-07T10:24:20.020 回答