【发布时间】:2020-11-16 07:18:02
【问题描述】:
我有一个 MongoDB 集合,名为:ec2_list-07-26-2020
如果我尝试对其进行典型操作,例如 find() 或 validate(),我会收到此错误:
db.ec2_list-07-26-2020.find()
2020-07-26T20:17:16.845-0400 E QUERY [js] uncaught exception: SyntaxError: identifier starts immediately after numeric literal :
@(shell):1:18
所以我创建了一个名为:audit00 的测试集合。当我对该集合执行相同操作时,它可以正常工作:
db.audit00.find()
{ "_id" : ObjectId("5f1e1e02807681425a06fa07"), "writeConcern" : "yes", "ordered" : "True" }
还有:
db.audit00.validate()
{
"ns" : "aws_inventories.audit00",
"nInvalidDocuments" : NumberLong(0),
"nrecords" : 1,
"nIndexes" : 1,
"keysPerIndex" : {
"_id_" : 1
},
"valid" : true,
"warnings" : [
"Some checks omitted for speed. use {full:true} option to do more thorough scan."
],
"errors" : [ ],
"extraIndexEntries" : [ ],
"missingIndexEntries" : [ ],
"ok" : 1
}
我命名收藏的方式是否有问题需要更改?
【问题讨论】:
标签: mongodb