zoukankan      html  css  js  c++  java
  • MongoDB

    http://www.cnblogs.com/libingql/archive/2011/06/09/2076440.html

    ===

    > show dbs
    admin          (empty)
    local          0.031GB
    nutch_eclipse  0.031GB
    test           (empty)
    > use nutch_eclipse
    switched to db nutch_eclipse
    > show collections
    system.indexes
    webpage
    > db.webpage.count()
    467
    > 

     ==

    > db.webpage.findOne()
    {
        "_id" : "cn.edu.hist.crjyxy:http/info/1012/1085.htm",
        "status" : 1,
        "fetchTime" : NumberLong("1439345028815"),
        "fetchInterval" : 2592000,
        "retriesSinceFetch" : 0,
        "score" : 0,
        "inlinks" : {
            "http://crjyxy·hist·edu·cn/zzjd·htm" : "关于2009年度中等职业学校专业骨干教师国家级培训的通知"
        },
        "markers" : {
            "dist" : "2"
        },
        "metadata" : {
            "_csh_" : BinData(0,"AAAAAA==")
        }
    }

    ==

    > db.webpage.distinct("_id")
    [
        "cn.edu.hist.chengj:http/pxjd/index.asp",
        "cn.edu.hist.crjyxy:http/200936122845946.rar",
        "cn.edu.hist.crjyxy:http/index.htm",
        "cn.edu.hist.crjyxy:http/info/1012/1075.htm",
        "cn.edu.hist.crjyxy:http/info/1012/1079.htm",
        "cn.edu.hist.yyylxy:http/",
        "cn.edu.hist.zdxx:http/",
        "cn.edu.hist.zgwyhdx:http/",
        "cn.edu.hist.zsxx:http/",
        "cn.edu.hist.zyyhjxy:http/",
        "cn.edu.hist.zzb:http/"
    ]
    > 

    ==

    > db.webpage.find().count()
    467

    ==

    > db.webpage.find().limit(5)
    { "_id" : "cn.edu.hist.crjyxy:http/info/1012/1085.htm", "status" : 1, "fetchTime" : NumberLong("1439345028815"), "fetchInterval" : 2592000, "retriesSinceFetch" : 0, "score" : 0, "inlinks" : { "http://crjyxy·hist·edu·cn/zzjd·htm" : "关于2009年度中等职业学校专业骨干教师国家级培训的通知" }, "markers" : { "dist" : "2" }, "metadata" : { "_csh_" : BinData(0,"AAAAAA==") } }
    { "_id" : "cn.edu.hist.jwc:http/jwxw.htm", "status" : 1, "fetchTime" : NumberLong("1439345028926"), "fetchInterval" : 2592000, "retriesSinceFetch" : 0, "score" : 0, "inlinks" : { "http://jwc·hist·edu·cn/" : "" }, "markers" : { "dist" : "2" }, "metadata" : { "_csh_" : BinData(0,"AAAAAA==") } }
    { "_id" : "cn.edu.hist.chengj:http/pxjd/index.asp", "status" : 1, "fetchTime" : NumberLong("1439345028769"), "fetchInterval" : 2592000, "retriesSinceFetch" : 0, "score" : 0, "inlinks" : { "http://crjyxy·hist·edu·cn/info/1012/1078·htm" : "http://chengj.hist.edu.cn/pxjd/index.asp" }, "markers" : { "dist" : "3" }, "metadata" : { "_csh_" : BinData(0,"AAAAAA==") } }
    { "_id" : "cn.edu.hist.crjyxy:http/200936122845946.rar", "status" : 1, "fetchTime" : NumberLong("1439345028786"), "fetchInterval" : 2592000, "retriesSinceFetch" : 0, "score" : 0, "inlinks" : { "http://crjyxy·hist·edu·cn/info/1012/1084·htm" : "教育部文件.rar" }, "markers" : { "dist" : "3" }, "metadata" : { "_csh_" : BinData(0,"AAAAAA==") } }
    { "_id" : "cn.edu.hist.www:http/info/1099/9733.htm", "status" : 1, "fetchTime" : NumberLong("1439345029107"), "fetchInterval" : 2592000, "retriesSinceFetch" : 0, "score" : 0, "inlinks" : { "http://www·hist·edu·cn/index/sy/tzgg/kjc·htm" : "关于我校组织参加“第四届中国创新创业大赛河南赛区暨河南省科技创业雏鹰大赛”的通知" }, "markers" : { "dist" : "2" }, "metadata" : { "_csh_" : BinData(0,"AAAAAA==") } }

    == 

    > db.webpage.find().skip(466)
    { "_id" : "cn.edu.hist.zzb:http/", "status" : 1, "fetchTime" : NumberLong("1439345029199"), "fetchInterval" : 2592000, "retriesSinceFetch" : 0, "score" : 0, "inlinks" : { "http://www·hist·edu·cn/jgsz/dqjg·htm" : "党委组织部" }, "markers" : { "dist" : "2" }, "metadata" : { "_csh_" : BinData(0,"AAAAAA==") } }

    ====

    > db.webpage.remove({})
    WriteResult({ "nRemoved" : 467 })
    > db.webpage.find().count()
    0

    ==

  • 相关阅读:
    Linux中/etc目录下passwd和shadow文件
    Linux基本命令
    Linux目录结构说明与基本操作
    如何用虚拟机VMware Workstation安装CentOs-7
    VPP源码分析及流程图
    VPP环境搭建及配置
    【转】智能指针的交叉引用问题及解决方法
    二叉树的前 中 后 层序遍历
    排序算法
    C和C++的一些区别
  • 原文地址:https://www.cnblogs.com/zhjsll/p/4723821.html
Copyright © 2011-2022 走看看