【问题标题】:How can I limit an Artifactory aql query to a specific repository?如何将 Artifactory aql 查询限制到特定存储库?
【发布时间】:2019-09-25 09:28:40
【问题描述】:

我有这个有效的 aql 查询:

items.find({"@myproperties.fileType":{"$match": "myFile"},"@myproperties.otherType":{"$match": "thisType"}})

它返回我期望的所有结果。但是,此查询会在每个存储库中查找包含这些属性的文件。
如何将搜索限制在特定存储库?

【问题讨论】:

    标签: artifactory artifactory-query-lang


    【解决方案1】:

    这是需要的格式:

    items.find({"repo":{"$eq":"myrepo"}}, {"$and":[{"@myproperties.fileType":{"$match": "myFile"}},{"@myproperties.otherType":{"$match": "thisType"}}]})   
    

    这种查询语言不是很直观,但确实如此。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-22
      • 1970-01-01
      • 2011-10-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多