阅读背景:

匹配mongo聚合中的两个字符串对象字段

来源:互联网 
> db.doc.find().pretty();
{
    "_id" : ObjectId("55669401a5f628a23fed5adc"),
    "cur" : {
        "pathname" : "/blog",
        "href" : "https://www.example.com/blog/"
    },
    "visits" : [
        {
            "url" : "https://www.example.com/blog/",
            "gt_ms" : "1110"
        }
    ]
}
{
    "_id" : ObjectId("556697eba5f628a23fed5add"),
    "cur" : {
        "pathname" : "/twcontroller/insights/login.php",
        "href" : "https://www.example.com/twcontroller/insights/login.php"
    },
    "visits" : [
        {
            "url" : "https://www.example.com/twcontroller/insights/login.php",
            "gt_ms" : "990"
        }
    ]
}
{
    "_id" : ObjectId("556697eba5f628a23fed5ade"),
    "cur" : {
        "pathname" : "/",
        "href" : "https://www.example.com/"
    },
    "visits" : [
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "719"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "719"
        }
    ]
}
{
    "_id" : ObjectId("556697eba5f628a23fed5adf"),
    "cur" : {
        "pathname" : "/",
        "href" : "https://www.example.com/"
    },
    "visits" : [
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        },
        {
            "url" : "https://www.example.com/",
            "gt_ms" : "62"
        }
    ]
}
> db.doc.find().pretty();
{
    "_id" : ObjectI



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: