1

我有一个 MongoDB 集合,其中包含以下数据

> db.UpdateQueryRegistry.find({"studyId" : "20130117193010cfab"})

{  "_id":ObjectId("50f95af799ac247d280484dc"),
   "attempts":0,
   "eTime": ISODate("2013-01-17T17:03:36.501Z"),
   "lastUpdDt": ISODate("2013-01-18T14:23:51.141Z"),
   "numQueries":1,
   "query":"Q1",
   "sTime":null,
   "start":0,
   "status":"COMPLETED",
   "studyId":"20130117193010cfab",
   "updateAction":"convertToIUorNO",
   "updateSource":"DOCUMENTSTATUS"
}
{ "_id":ObjectId("50f95af799ac247d280484db"),
   "attempts":0,
   "eTime": ISODate("2013-01-17T19:50:34.392Z"),
   "lastUpdDt": ISODate("2013-01-18T14:23:51.141Z"),
   "numQueries":1,
   "query":"Q2",
   "sTime":null,
   "start":0,
   "status":"COMPLETED",
   "studyId":"20130117193010cfab",
   "updateAction":"instanceAddQuery",
   "updateSource":"ONTOLOGY"
}
{ "_id":ObjectId("50f95af799ac247d280484da"),
   "studyId":"20130117193010cfab",
   "updateSource":"ONTOLOGY",
   "updateAction":"instanceDeleteQuery",
   "query":"Q3",
   "sTime":null,
   "eTime":null,
   "status":"PENDING",
   "numQueries":0,
   "lastUpdDt": ISODate("2013-01-18T14:23:51.141Z"),
   "attempts":0,
   "start":0
}

索引在 DB 上创建如下:

> db.UpdateQueryRegistry.stats().indexSizes

{
    "_id_" : 8176,
    "studyId_1_status_1" : 24528,
    "studyId_1_updateSource_1_updateAction_1_query_1" : 98112
}

但是当我触发查询时

db.UpdateQueryRegistry.find({
    "studyId" : "20130117193010cfab",
    "updateSource" : "ONTOLOGY",
    "updateAction" : "instanceDeleteQuery"
})

我没有得到任何结果,但是当我触发查询时

db.UpdateQueryRegistry.find({
    "studyId" : "20130117193010cfab"
})

我看到上面显示了 3 个结果。请告诉我这是否有任何错误。

4

0 回答 0