0

Here below the defined spec file, I want to add more values in the "path": {$match}function. I mean I need to define more than one path in this syntax is that possible? i.e.: Test/dev , Test/qa , Test/prod etc..

  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "Testing",
          "path": {"$match":"Test/dev"},
          "name": {"$match":"*"},
          "type": "file",
          "$or": [
            {
              "$and": [
                {
                  "created": { "$before":"90d" }
                }
              ]
            }
          ]
        }
      }
    }
  ]
}
TylerH
  • 20,799
  • 66
  • 75
  • 101
Hiral Solanki
  • 33
  • 1
  • 4

1 Answers1

0

You can add them in the "or" clause:

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

Read more:

  1. AQL documentation
  2. Using File Specs
yahavi
  • 5,149
  • 4
  • 23
  • 39