0

我有这个有效的 aql 查询:

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

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

4

1 回答 1

1

这是需要的格式:

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

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

于 2019-09-25T13:40:37.870 回答