I just discovered a bizarre behavior exhibited by MongoDB.
很显然,任何“系统”的收集名称都不正确。
To make matters worse, it won t even tell you anything is wrong!
这实际上更是一个好奇的问题,但没有人会想为什么会发生? 它是否记载了什么地方?
我的假设是,它利用“系统.*”收集来储存内部物品(如指数),并不想让你与他们交谈,但这似乎与我正确的行为一样。
I just discovered a bizarre behavior exhibited by MongoDB.
很显然,任何“系统”的收集名称都不正确。
To make matters worse, it won t even tell you anything is wrong!
这实际上更是一个好奇的问题,但没有人会想为什么会发生? 它是否记载了什么地方?
我的假设是,它利用“系统.*”收集来储存内部物品(如指数),并不想让你与他们交谈,但这似乎与我正确的行为一样。
You are correct "system.*" is a reserved collection namespace used by MongoDB in each DB.
它用于储存指数和用户等。
但是,你总是可以提出这种功能的请求:。
你们可以看看他们,......
<代码>>显示采集编码>
和你看一看......
http://www.un.org。
<编码>系统>用户
因此,你可以看到你的指数:
> db.system.indexes.find()
摘自MongoDB :
The .system.* namespaces in MongoDB are special and contain database system information. System collections include:
- system.namespaces lists all namespaces.
- system.indexes lists all indexes.
- Additional namespace / index metadata exists in the database.ns files, and is opaque.
- system.profile stores database profiling information.
- system.users lists users who may access the database.
- local.sources stores replica slave configuration data and state.
- Information on the structure of a stored object is stored within the object itself. See BSON .
There are several restrictions on manipulation of objects in the system collections. Inserting in system.indexes adds an index, but otherwise that table is immutable (the special drop index command updates it for you). system.users is modifiable. system.profile is droppable.
How can I deploy a Django project that uses MongoDB to AWS? I have a project made using Django and have been using MongoDB and its Compass app and was wondering if you could deploy said project and ...
Whats the best way to access/query a DB Ref: UPDATE: users: name, groupref : {$ref:"groups",$id:"ObjectId ..." } } groups: name, topic, country,...,.. Assumption is that user belongs to only one ...
Example: > db.stuff.save({"foo":"bar"}); > db.stuff.find({"foo":"bar"}).count(); 1 > db.stuff.find({"foo":"BAR"}).count(); 0
What re the best practices to store nested sets (like trees of comments) in MongoDB? I mean, every comment can have a parent comment and children-comments (answers). Storing them like this: { ...
I ve been using the following web development stack for a few years: java/spring/hibernate/mysql/jetty/wicket/jquery For certain requirements, I m considering switching to a NoSQL datastore with an ...
I m building a Rails application using MongoDB as the back-end and MongoMapper as the ORM tool. Suppose in version 1, I define the following model: class SomeModel include MongoMapper::Document ...
I have the following setup: Mac Pro with 2 GB of RAM (yes, not that much) MongoDB 1.1.3 64-bit 8 million entries in a single collection index for one field (integer) wanted Calling .ensureIndex(...) ...
My application creates pieces of data that, in xml, would look like this: <resource url="someurl"> <term> <name>somename</name> <frequency>somenumber</...