Source Address http://www.ningoo.net/html/2011/mongodb_in_a_nutshell_2.html by ningoo
I have talked about a bunch of things before. The best way is to let him run it, and then verify its implementation with the help of documents and tests, and
In the past few days, a function has been implemented in the project to read the home location information of the mobile phone, and then insert the MongoDB
Mobile phone location format
Number
Province
City
Card Type
1. 100 entries are generated
VaR A = new array (100); // There Is. foreach. I don't know why I can only use for (VAR I = 0; I CodeLine feed
Using dB. Test. Find (), you can see that the database has been imported into the database. Enter the it
1. The SOLR field is written to death.
2 SOLR advantages: fuzzy query of large text, MongoDB also supports regular query and js-like syntaxCodeStatement Query
3 MongoDB already supports local updates and an upsert. The SOLR will be updated first,
I just got started with MongoDB. I don't want to write it this time. I feel very useful when I read several other blogs.
These are based on the. NET platform.
From the official MongoDB Website:
Basic Quick Start, ten minutes fast get, don't drag:
The official download site for MongoDB is http://www.mongodb.org/downloads. you can download the latest
Program . On the download page, you can see that OS X, Linux, windows, and Solaris are fully supported, and each version has its own 32-bit and 6
Introduction
MongoDB is a distributed file storage-based database. It is designed to provide scalable, high-performance data storage solutions for Web applications.
It is a product between relational databases and non-relational databases. It
MongoDB mobile chunks scriptAs the data volume increases, you may need to add shards. After adding shards, you need to move some of the data to the new shards. Originally, MongoDB supports automatic balancing (balancer, that is, automatically
MongoDB master-slave replication without verification, but one configuration role is master and oplog, And the other configuration role is slave.And the Master Ip port can be started.If it comes with verification, it will be troublesome.
MASTER:1.
Healthcheck used MongoDB, need to install, temporarily extract the reference method on the network as follows http://www.linuxidc.com/Linux/2010-08/28068.htm
MongoDB is a scalable and high-performance next-generation database. Data in MongoDB is
1. Download the installation packageWget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz
Decompress the package after the download is complete.Tar zxf mongodb-linux-i686-1.8.2.tgz 2. Installation preparationMove MongoDB to the/usr/local/
Geographic location index support is one of the highlights of MongoDB, which is also one of the reasons why Foursquare, the world's most popular lbs service, chooses MongoDB. We know that the general database index structure is B + tree, and how to
Document directory
1. Preparation Information Processing (each node can be the same or different)
2. Start the mongod instance
3. Configure and initialize the replica set
4. view the replica set status
1. read/write splitting
2. automatic
1. Create a database:
> Use tutorialSwitched to DB tutorial
Here, you may have questions about how to use the tutorial database we have not created?
In fact, databases and collections are only created when document data is inserted for the first
Document directory
Download and install mongdb
MongoDB drivers
Nosql has been popular for a while, and I seem to be a little late. There are many nosql products, and MongoDB is only one of them. The reason why I chose to learn MongoDB is
For databases, a powerful management tool will greatly improve our work efficiency. For MongoDB, mongovue is such a tool. mongovue starts charging fees after version 1.0, so I still use version 0.9.7.2. It is enough for beginners. After installation
1. Tips for using shell
Shell built-in help:
You can use dB. Help () to view database-level command help. You can use dB. Blog. Help ()
Do not enter parentheses when entering the function, so that the JavaScript source code of the function can be
Create document
Insert data into MongoDB using insert,
Example: DB. refactor. insert ({"refactor's blog": "http://www.cnblogs.com/refactor "})
This operation adds a "_ id" Key to the document and stores it in the database.
Batch insert
If you want
The cluster is composed of three servers (assuming the IP address is servera, serverb, and serverc) and uses the MongoDB replica set + sharding (replica sets + sharding) implements high reliability, high availability, and load balancing for Data
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.