ã¯ããã« ååããMongoDBã®éæ©è½é¢ã«çç®ãã¦ãã¾ãããä»åã¯MongoDBã®ç£è¦ã«ã¤ãã¦èª¬æãã¾ããã¾ããMongoDBã®ç£è¦ã§ä½¿ããã¨ãã§ããæ©è½ããã¼ã«ãç´¹ä»ãããã®å¾ããããã®ãã¼ã«ãç¨ãã¦ã©ã®ããã«MongoDBãç£è¦ãããã«ã¤ãã¦ä¸è¬çãªèãæ¹ãç´¹ä»ãã¾ããMongoDBã¯ææ°ãã¼ã¸ã§ã³ã®2.4ã対象ã¨ãã¦ãã¾ãã ã³ãã³ã表è¨ã«ã¤ãã¦$ ï¼ ã³ãã³ãã©ã¤ã³ã§å®è¡ããã³ãã³ã ç£è¦æ©è½ã®ç´¹ä» ãã®ã³ã° æåã«ç£è¦ã®åºæ¬ã¨ããããããã®ã³ã°ã«ã¤ãã¦èª¬æãã¾ããMongoDBã§ã¯ä½ãæå®ããªãã¨æ¨æºåºåã«ãã°ãåºåããã¾ããããã¡ã¤ã«ã«åºåããå ´åã¯ã --logpath ããªãã·ã§ã³ã«ã¦ãã°ã®åºåå ãæå®ãã¾ãã $ mongod --logpath=/var/log/mongodb.log ãã®ã¾ã¾ã ã¨ã次åèµ·åæã«ãã°ã¯ãã¼ãã¼ã·ã§ã³ããã¦ãã¾ãã¾ãããã°ããã¼ãã¼ã·ã§
unique index ã§ã³ã¬ã¯ã·ã§ã³ã«ä¸æå¶ç´ã課ã ã¾ã unique index ãã»ããããã > db.books.createIndex({title: 1}, {unique: true}) { "createdCollectionAutomatically" : true, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "ok" : 1 } ä¸è¨ã®ã³ãã³ã㧠books ã³ã¬ã¯ã·ã§ã³ã field: title ã«ã¤ãã¦ä¸æå¶ç´ã課ããã¦ããç¶æ ã«ãªãã ãã®ç¶æ ã§ãåã title ã®ããã¥ã¡ã³ãã2件ä½æãããã¨è©¦ã¿ãã¨ã2件ç®ã§å¤±æããã > db.books.insert({title: 'ç«ã§ãããã MongoDB'}) WriteResult({ "nInserted" : 1 }) > db.books.in
MongoDBã®Offical Goè¨èªDriver v1.0.0ãï¼æã«ãªãªã¼ã¹ãããã®ã§Goè¨èªã®åå¼·ãå ¼ãã¦ä½¿ã£ã¦ã¿ã¾ããã https://docs.mongodb.com/ecosystem/drivers/go/ å®è¡ç°å¢ Windows 10 go.12 windows/amd64 MongoDB Communityç 4.0.7 MongoDB Go Driver 1.0.0 Goããã±ã¼ã¸ç®¡çãã¼ã« dep ã¨ãã£ã¿ VS Code & Go Extension åæ MongoDBãã¤ã³ã¹ãã¼ã«ããã¦ãã Goè¨èªãã¤ã³ã¹ãã¼ã«ããã¦ãã
as the title says, I want to perform a find (one) for a document, by _id, and if doesn't exist, have it created, then whether it was found or was created, have it returned in the callback. I don't want to update it if it exists, as I've read findAndModify does. I have seen many other questions on Stackoverflow regarding this but again, don't wish to update anything. I am unsure if by creating (of
MongoDBã§ã¯ãã¤ã³ããã¯ã¹ã使ç¨ããäºã§å¹ççã«ã¯ã¨ãªã®å®è¡ãè¡ããã¨ãã§ãã¾ãã ã¤ã³ããã¯ã¹ã使ç¨ããªãã¨å¿ ãå ¨ã³ã¬ã¯ã·ã§ã³ã¸ã®ã¹ãã£ã³ãçºçãã¾ãã ããã¯ã¨ãªã«å¯¾ãã¦é©åãªã¤ã³ããã¯ã¹ãåå¨ããã°ãã¤ã³ããã¯ã¹ã使ç¨ãã¹ãã£ã³ããããã¥ã¡ã³ãã®æ°ãå¶éãããã¨ãã§ãã¾ãã ã¤ã³ããã¯ã¹ã«ã¯ãç¹å®ã®ãã£ã¼ã«ãã¾ãã¯ãã£ã¼ã«ãã»ããã®å¤ããã£ã¼ã«ãã®å¤é ã§æ ¼ç´ããã¾ãã ã¤ã³ããã¯ã¹é ç®ã®é åºã¯ãç価ä¸è´ããã³ç¯å²ãã¼ã¹ã®ã¯ã¨ãªæä½ããµãã¼ããã¾ãã ããã«ãã¤ã³ããã¯ã¹ã使ç¨ãã¦ã½ã¼ãçµæãåå¾ãããã¨ãã§ãã¾ãã åºæ¬çã«ã¯MongoDBã®ã¤ã³ããã¯ã¹ã¯ä»ã®DBã®ã¤ã³ããã¯ã¹ã¨ä¼¼ã¦ãã¾ãã ã³ã¬ã¯ã·ã§ã³ã«å¯¾ãã¦ã¤ã³ããã¯ã¹ãå®ç¾©ããããã¥ã¡ã³ãä¸ã®ä»»æã®ãã£ã¼ã«ãããµããã£ã¼ã«ãã¸ã®ã¤ã³ããã¯ã¹ããµãã¼ããã¦ãã¾ãã ããã©ã«ã _id ã¤ã³ããã¯ã¹ MongoDBã§ã¯ãã³ã¬
MongoDB Moblieçºè¡¨ããã«æ©è½ã®MongoDBãiOS/Androidã«å¯¾å¿ããµã¼ãã®MongoDBã¨ã®ãã¼ã¿åæãå¯è½ã« NoSQLãã¼ã¿ãã¼ã¹ã¨ãã¦ç¥ãããMongoDBã®éçºå ã§ããMongoDB社ã¯6æ27æ¥ããã¥ã¼ã¨ã¼ã¯ã§éå¬ãããå社ã®ã¤ãã³ããMongoDB World'18ãã«ããã¦ãMongoDB 4.0ã®çºè¡¨ã¨åæã«ã¢ãã¤ã«ããã¤ã¹ã«å¯¾å¿ãããMongoDB Mobileããçºè¡¨ãã¾ããã ãMongoDBã®ãµã¼ããµã¤ãã§ã®éçºã®çµé¨ã¨æ©è½ãã¾ã£ããåãããã«ãã©ã®iOSããã¤ã¹ãAndroidããã¤ã¹ã§ã使ããã®ã ãï¼MongoDB CTOå ¼å ±ååµæ¥è Eliot Horowitzæ°ï¼
MongoDBã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¨ããã¦ããï¼MongoDBã®ObjectIdã£ã¦æ¬å½ã«ã¦ãã¼ã¯ã ã£ãï¼ã£ã¦ããçåããããï¼ ç¢ºããããããªè¦ç´ ã使ã£ã¦ï¼ã¦ãã¼ã¯ã«ãªãããã«ã§ãã¦ãããªãï¼ï¼ï¼ã¨æã£ã¦ï¼ã¡ããã¨èª¿ã¹ã¦ã¿ãï¼ ã¨ããããå ¬å¼ã®ObjectIdã®èª¬æï¼ObjectId - MongoDB Manual 2.4.9 4ãã¤ãã®ï¼Unixã¨ããã¯ããã®çµéç§æ°(Unixæé) 3ãã¤ãã®ãã·ã³ID 2ãã¤ãã®ããã»ã¹ID 3ãã¤ãã®ã«ã¦ã³ã¿(éå§çªå·ã¯ã©ã³ãã ) ããã§ãã¦ãããããï¼ âããã°ã£ã¦æ¸ããï¼ å®é¨ï¼ åããã·ã³ã§çæãã¦ã¿ãï¼ ä»¥ä¸ã®ï¼ã¤ã®ObjectIdã¯åããã·ã³ä¸ã§çæããObjectId. 52fcf106 0af12b af9e 8d5bba 52fcf108 0af12b af9e 8d5bbb 確ãã«æåã®Unixæéã¯2ç§ããã¦ãããã¨ããããï¼
ãã®è¨äºã¯MongoDB Advent Calendar 2015ã®17æ¥ç®ã§ãã æ¦è¦ ä½ãä»æ´ææºè¼ã®ããããè¨äºã§ãã æå³ããåãå«ãå¯è½æ§ãã¼ãã§ã¯ãªãã®ã§ãããã¥ã¡ã³ã Replication â MongoDB Manual 3.0 ä½µèªæ¨å¥¨ã§ãã Replica Setã¨ã¯ï¼ Replication Introduction â MongoDB Manual 3.0 Replica Setã¨ã¯ãMongoDBãåããå¼·åãªã¬ããªã±ã¼ã·ã§ã³ã¨èªåãã§ã¤ã«ãªã¼ãã¼ã®ä»çµã¿ã§ãã è¤æ°å°ã®MongoDBãµã¼ãã¼ã§æ§ç¯ãããReplica Setã¯ãããä¸ã¤ã®MongoDBã®å¼·åãªæ©è½ã§ããSharding (æ°´å¹³åå²)ã«ããã¦Shardã¨ãã¦è¿½å ãããã¨ãå¯è½ã§ãã ã©ã¡ãã大è¦æ¨¡ã§é«å¯ç¨ãªMongoDBãã¼ã¿ãã¼ã¹ãæ§ç¯ããéã«æ¬ ãããªããã®ã§ããããããæ¨æºæ©è½ã¨ãã¦æã£ã¦ã
mongoDBã®ã³ã¬ã¯ã·ã§ã³ã«ã¯natural orderã¨ããæ¦å¿µãããã¾ããsortããã«findããã¨ã¤ã³ãµã¼ããããæéãå¤ããã®ããé çªã«åå¾ããã¾ããããã®ä¸¦ã³é ãnatural orderã æ°ããé ã«ããã¥ã¡ã³ããåå¾ãããå ´å㯠sort ã« { $natural: -1 } ã¨æå®ããã°ããã¼ db.Hoge.find().sort({ $natural: -1 }); é£çªãã£ã¼ã«ããæå»ãã£ã¼ã«ããç¨æãã¦sortãããããããªãéãã§ãã ãã ããnatural orderã¯ãã£ã¹ã¯ä¸ã®ç©ççãªé çªãªã®ã§ãåæ£ç°å¢ã§ãã£ã³ã¯ç§»åãçºçããå ´åããupdateã§ããã¥ã¡ã³ãã大ããå¤æ´ãããå ´åãªã©ã«å¤ãã£ã¦ãã¾ãã¾ããã ãããæ°ããé ã§ãããã¼ãã¨ãããããªãããç¶æ³ã§ãªããã°ä½¿ãã¾ããã â» capped collectionã¯ã¤ã³ãµã¼ãé ã¨natural or
5. MongoDBã®ããã¨ãã ⢠ä¸è¨ã§è¨ããªãããæ軽ãã-ãããæå³ã§ ⢠Webã¢ããªã±ã¼ã·ã§ã³ã§æ±ããããæ©è½ãæã£åãæ©ã使ãã ⢠å¤ç®çã®é«æ§è½ããªã¼ããè»ã ⢠ã¤ã³ã¹ãã¼ã©ãããã±ã¼ã¸ã§ããåãã¾ã ⢠ã»ã«ã³ããªã¤ã³ããã¯ã¹ãã¯ã¨ãªãªããã£ãã¤ã¶ããã ⢠å¤ãã®è¨èªã§ãä»æ§ãããç¨åº¦çµ±ä¸ããã¦ãããã©ã¤ããå©ç¨å¯è½
ã¿ãªããããã°ãã¯ã éã«åæã¨ãªã¬ã¼ããã°ãå§ãããã¨ã«ãã¾ããã é åã¿ãã¡ã®ãªã¬ã¼ããã° - ã¯ã¦ãªããã° ã°ã«ã¼ã é åã¿ãã¡ã®ãªã¬ã¼ããã°ã¨ããããã¨ã²ã©ãã¿ã¤ãã«ã«ããã®ã«èª°ãæå¥è¨ããã¾ããã§ããã ã¿ããªèªè¦ãã¦ããããã§ãã ãã¦ãä»åãªã«ãããããªã¨æã£ããã§ãããä»äºã§MongoDBã使ã£ã¦ããã®ã§ãããé¢é£ã«ãããã¨æãã¾ããã ã¨ããçç±ã«ãããMongoDBã§ããInitial Syncããããã¨ãå¤ããã§ããã Tutorialããã£ããèªãã ãã¨ãªãã£ãã®ã§ããããèªã¿ã¤ã¤å®éã«è¡ã£ã¦ã¿ããã¨æãã¾ããã åæï¼MongoDBã®ã¬ããªã±ã¼ã·ã§ã³ã«ã¤ãã¦ï¼ åæã¨ãã¦ãMongoDBã®ã¬ããªã±ã¼ã·ã§ã³ã¯Primaryã®local ãã¼ã¿ãã¼ã¹ã®oplogã¨ããã³ã¬ã¯ã·ã§ã³ã«å¤æ´ã«é¢ããæ å ±ãæããã¦ããããSecondaryéãèªã¿ã«è¡ããåæãè¡ãã¨ãã£ãæ¹
v1.8ã§MongoDBã¯ã¸ã£ã¼ããªã³ã°ã¨å¼ã°ããæ©è½ãæ°ãã«å ããã¾ãããä»æ¥ã¯MongoDBã®ã¸ã£ã¼ããªã³ã°ã«ã¤ãã¦ãå®éã«ã©ã®ãããªå¦çãè¡ããã¦ããã®ãã確èªããªãããä¸å¯§ã«è¦ã¦ãããã¨ã«ãã¾ããããâ»ãªããã¸ã£ã¼ããªã³ã°ã¨ããè¨èèªèº«ãMongoã«ãã®æ©è½ãå®è£ ãããã¾ã§æ·±ãæèãããããªãã¨ã¯ããã¾ããã§ããã解éã®é¨åã§èª¤ããªã©ãããããããã¾ããããã®éã¯ãææãã¦ããã ããã¨å¹¸ãã§ãã ã¸ã£ã¼ããªã³ã°ã«ãã£ã¦ãã¼ã¿ã®å ç¢æ§ãæ ¼æ®µã«é«ã¾ã£ã v1.8ã§ã¸ã£ã¼ããªã³ã°æ©è½ã追å ããããã¨ã«ãã£ã¦ãã·ã³ã°ã«ãµã¼ãã¼ã«ããããã¼ã¿ã®å ç¢æ§ãããã«é«ã¾ãã¾ãããã¸ã£ã¼ããªã³ã°ã¨ããè¨èã¯ä¸»ã«ãã¡ã¤ã«ã·ã¹ãã ã®åéã«ããã¦ããªãåããè°è«ãããæ¹åãé²ãããã¦ããæ©è½ã§ãããã®æå³ã«ãããã¸ã£ã¼ããªã³ã°ã®ç®çã¯ãã¡ã¤ã«ã·ã¹ãã å ¨ä½ãä¿è·ãããã¨ã§ããããã®ããã«ã¡ã¿ãã¼ã¿ã®æ´åæ§ãä¿
I want to run sharelatex on my vServer (CentOS 6). I installed everything but sharelatex won't start. The mongod.log says after accepting some connections: 2015-02-12T12:04:30.971+0100 [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable 2015-02-12T12:04:30.971+0100 [initandlisten] can't create new thread, closing connection I already increased the ulimits: [root@vServe
mongoDBã§åã³ã¬ã¯ã·ã§ã³ã®ãµã¤ãºãä¸æ¬ã§èª¿ã¹ãæ¹æ³ã¡ã¢ã mongoDBã§åã³ã¬ã¯ã·ã§ã³ã®ãµã¤ãºã調ã¹ãã¯ã³ã©ã¤ãã¼ db.getCollectionNames().forEach(function(n){print(n + "," + db[n].stats().storageSize/1024/1024/1024 + "GB")}) db.getCollectionNames()ã£ã¦ã®ãæ®éã«mongoã¯ã©ã¤ã¢ã³ãã使ã£ã¦ããã¨æãæµ®ãã°ãªãâ¦ã db.getCollectionNames()ã使ãã¨ãã³ã¬ã¯ã·ã§ã³ãµã¤ãºã«éãããè²ã ãªæä½ãä¸æ¬ã§åºæ¥ãã # cappedã³ã¬ã¯ã·ã§ã³ãªã®ããä¸æ¬ã§èª¿ã¹ã db.getCollectionNames().forEach(function(n){print(n + "," + db[n].stats().capped)}) # ã¤ã³
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}