我的目标是搜索未收到任何延迟回拨响应的API的帖子。我愿意使用MongoDb控制台,因此无需实现DBRef,也不会将两个文档合并为一个。结构可以定义如下:
发布到API:
posts
{
"keyword":"Some keyword",
"post_date":"03-08-2014"
},
{
"keyword":"Some other keyword",
"post_date":"03-08-2014"
}
{
"keyword":"Some other keyword but no callback received",
"post_date":"03-08-2014"
}
API回调响应:
callback
{
"keyword":"Some keyword",
"reception_date":"03-08-2014"
"response" : "Hey"
},
{
"keyword":"Some other keyword",
"reception_date":"03-08-2014"
"response" : "Hey"
}
根据关键字和matchin post_date与reception_date,我愿意找到所有没有收到任何回调的帖子。
关于我如何做到这一点的任何想法?
谢谢!