0
我在我的集合中有这个文档,我需要找到哪个字段的值大于20000,对于像这样的所有文档。一些字段正在为集合动态更改。在一个集合中查找哪个字段的大小大于20000(mongodb)
db.doors.find(
{
"doorseller": "e0asda9a0fqqf7-f0asdas66-48c4-bfe5-ssss",
"good.Derinlik.value" : {$exists:true},
$where: "this.good.Derinlik.value.length > 20000"
}
)
这个工程,但我也需要检查其他领域;但我不想手动为每个人写一个查询。有没有这方面的方法? 比如我要检查
-runningStatus
-good.renkodu.value
而这个文件正在发生变化,他们的名字对每个文档。
这是样板文件
{
"doorseller" : "e0asda9a0fqqf7-f0asdas66-48c4-bfe5-ssss",
"_class" : "net.bowl.google.microservice.product.domain.Product",
"status" : "MATCHED",
"runningStatus" : "running_CREATED",
"hasValidImage" : true,
"doorID" : "3052007",
"door" : "4ef7a893-4158-4b4b-ba60-26cb9f75b988",
"good" : {
"Ekipman ID" : {
"value" : "",
"detail" : {
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
},
"history" : [
{
"value" : "",
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
}
]
},
"Renk Kodu" : {
"value" : "",
"detail" : {
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
},
"history" : [
{
"value" : "",
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
}
]
},
"Malzeme" : {
"value" : "",
"detail" : {
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
},
"history" : [
{
"value" : "",
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
}
]
},
"doorID" : {
"value" : "3052007",
"detail" : {
"revisedBy" : "admin",
"revisionDate" : ISODate("2017-02-10T07:15:05.405+0000")
},
"history" : [
{
"value" : "3052007",
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
},
{
"value" : "3052007",
"revisedBy" : "admin",
"revisionDate" : ISODate("2017-02-10T07:15:05.405+0000")
}
]
},
"Garanti Notu" : {
"value" : "",
"detail" : {
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
},
"history" : [
{
"value" : "",
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
}
]
},
"Derinlik" : {
"value" : "",
"detail" : {
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
},
"history" : [
{
"value" : "",
"revisedBy" : "door",
"revisionDate" : ISODate("2017-02-07T10:13:34.615+0000")
}
]
}
}}
它不是数字。我想检查字符串的长度或其他。他们不在相同的水平:( – mark