db.collection.find({})错误问题

发布问题 回首页

db.collection.find({})错误问题

★ 0 成为第一个关注这个问题的人

查询语句:db.getCollection(‘t_bike_info’).find({}) 可以正确查出全部文档
db.getCollection(‘t_bike_info’).find({“vin”:””}) 根据字段查询文档, 则报错信息如下
错误信息如下:
`Error: error: {
“_t” : “OKMongoResponse”,
“ok” : 0,
“code” : 2,
“errmsg” : “Message: {\”Errors\”:[\"An invalid query has been specified with filters against path(s) excluded from indexing. Consider adding allow scan header in the request.\"]}\r\nActivityId: b74f0cad-0000-0000-0000-000000000000, Request URI: /apps/333a13a6-33c2-4ae2-b716-4d70aaa20a9b/services/9dbf92d3-f6c5-4144-8598-d1e4158aac7d/partitions/a9561c13-e449-40ae-8a5f-fc6b220e04dc/replicas/131681973256134174s, RequestStats: \r\nResponseTime: 2018-06-06T01:36:30.7603632Z, StoreReadResult: StorePhysicalAddress: rntbd://10.213.68.171:14000/apps/333a13a6-33c2-4ae2-b716-4d70aaa20a9b/services/9dbf92d3-f6c5-4144-8598-d1e4158aac7d/partitions/a9561c13-e449-40ae-8a5f-fc6b220e04dc/replicas/131681973256134174s, LSN: 102, GlobalCommittedLsn: 100, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 0, IsGone: False, IsNotFound: False, IsInvalidPartition: False, RequestCharge: 1, ItemLSN: -1, ResourceType: Document, OperationType: Query\r\n, SDK: Microsoft.Azure.Documents.Common/2.0.0.0″,
“$err” : “Message: {\”Errors\”:[\"An invalid query has been specified with filters against path(s) excluded from indexing. Consider adding allow scan header in the request.\"]}\r\nActivityId: b74f0cad-0000-0000-0000-000000000000, Request URI: /apps/333a13a6-33c2-4ae2-b716-4d70aaa20a9b/services/9dbf92d3-f6c5-4144-8598-d1e4158aac7d/partitions/a9561c13-e449-40ae-8a5f-fc6b220e04dc/replicas/131681973256134174s, RequestStats: \r\nResponseTime: 2018-06-06T01:36:30.7603632Z, StoreReadResult: StorePhysicalAddress: rntbd://10.213.68.171:14000/apps/333a13a6-33c2-4ae2-b716-4d70aaa20a9b/services/9dbf92d3-f6c5-4144-8598-d1e4158aac7d/partitions/a9561c13-e449-40ae-8a5f-fc6b220e04dc/replicas/131681973256134174s, LSN: 102, GlobalCommittedLsn: 100, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 0, IsGone: False, IsNotFound: False, IsInvalidPartition: False, RequestCharge: 1, ItemLSN: -1, ResourceType: Document, OperationType: Query\r\n, SDK: Microsoft.Azure.Documents.Common/2.0.0.0″
}
`

还请各位大神指教,这个错误是什么原因?一直都没有找的到

TJ 在大约 之前 回答了
  • 提问于
  • Answers3 个
  • 浏览 21 次
  • 最新活跃于

3 个回答3

0
TJ answered about

这个看上去不是MongoDB,是微软的CosmosDB吧?

0
pengcheng789 answered about

你这是自问自答吗?

0
zhou_zhe@163.com answered about

这个问题我也是遇到过,查找文档也是没有找到

问题状态

  • Open

类别

3个参与者

db.collection.find({})错误问题》有13个想法

  1. 谢答,但个人认为不准确,1.mr我觉得不适合实时计算,更贴合后期数据统计需求,2.aggregate必须支持自定义函数,就好像你定义个abc(1,2)一样肯定是计算了,现在的问题是abc(1,2)这个参数我想传个字段进去,比如abc($qty,2)这样….他就不好使了….难道大家没有在aggregate中用字段进行计算的经历么?

发表评论