AWS

Mongo Monitoring Service to ensure uptime of MongoDB

Mongo Monitoring Service(MMS) is a service that ensures that the MongoDB is up and running and can alert us when the service is stopped/restarted.It can be run on an on-premise architecture or in the cloud like AWS. Use Case We have multiple servers running MongoDB service and they are present in different environments as Production,...

by Ankit Giri
Tag: MongoDB
30-Jun-2015

Technology

A use case and implementation of MongoDB Aggregation queries.

In any DBMS, aggregations are operations that process data records and return computed results. MongoDB provides a rich set of aggregation operations that examine and perform calculations on the data sets. Running data aggregation on the mongod instance simplifies application code and limits resource requirements. In my current...

by Manish Kapoor
Tag: MongoDB
08-Jun-2015

Node.js

High performance find query using lean() in mongoose

Lets start with a basic find query in mongoose and observe its execution time. [js] Event.find({'schedule.closing': {'$gte': +new Date()}}, {}, {limit:20, skip:0} ).exec(function (err, events){ ........ ........ } ); [/js] In my last project on Nodejs, I have used the above query to fetch the events...

by Sakshi Tyagi
Tag: MongoDB
13-Feb-2015

Technology

A level ahead with text search in mongoDb

In our previous post, we saw how simply we could use the free text search feature from MongoDB. In continuation to that, in this post we would be looking at how can we create multiple text indexes and understand how actually the things work. Document Scoring MongoDB assigns a score to each of the document that contains the search term...

by Sakshi Tyagi
Tag: MongoDB
11-Jul-2014

Technology

Free text search in MongoDb

MongoDb introduced free text search beta in its v2.4 but it was in experimental phase. In v.2.6, MongoDb has finally made its free text search (the most requested feature) production ready. In this post, we will have a look at how can we use this pretty useful feature that MongoDb offers us. To enable Free text search, Mongodb...

by Sakshi Tyagi
Tag: MongoDB
30-Jun-2014

Big Data, Grails

Our Experiences of MongoDB afternoon in New Delhi and Bangalore

We at IntelliGrape are an enthusiastic lot when it comes to technology conferences and knowledge sharing sessions. So lot of us were pretty excited to hear the news about mongoDB organising conferences in Delhi and Bangalore. More so, because we are early adaptors of MongoDB. Our entire Node.JS service line uses MongoDB as preferred...

by Narinder Kumar
Tag: MongoDB
30-May-2014

Node.js

_id With Mongoose

Let us take a very common use-case: "There will be a registration page for users, where users will provide their required details along with their picture”. Details would be saved to MongoDB while the pictures would be uploaded to Cloudinary or S3 with user unique id." Suppose we have User Schema as given below: [js] /* * Schema...

by Amit Kumar
Tag: MongoDB
12-Apr-2014

Node.js

Getting started with Mongoose !!

Mongoose is a Node.js package that gives you an interface to play with mongo database. Mongoose has all sets of methods that help you to connect and access data stored in database. It translates data from database in javaScript object which you can provide to your application. We will move step by step to know how it works. 1....

by ajay.mishra
Tag: MongoDB
07-Apr-2014

Node.js

Validation with Mongoose

In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and minimum value for that...

by Amit Kumar
Tag: MongoDB
19-Feb-2014

Technology

Capped Collections In Mongodb

We can create collections in mongoDb on which we can apply size limit. These special type of collections are called Capped Collections. These are a kind of circular queues, in which if allocated size limit is reached, it makes space for new documents by overwriting the oldest documents in the collection. How to create Capped...

by Sakshi Tyagi
Tag: MongoDB
26-Jan-2014

Technology

Group By in MongoDB(with $group)

MongoDB provides a rich set of aggregation. $group is one of them, with the help of $group, we can group documents (similar as group By in SQL). Lets understand by an example: Suppose we have following collection of blogs: [js] { userId:1, name:"Suroor", title:"AngularJS: Getting started with Directive", rating:3} { userId:2,...

by Amit Kumar
Tag: MongoDB
04-Oct-2013

Technology

How to Determine Average in MongoDB

MongoDB provides several ways of computing the average value of a group in a collection. One of the simplest ways of determining average is using the method db.collection.group(). The method db.collection.group() bunches the documents of a collection on the basis of the keys mentioned and executes aggregation functions on them. This...

by Sakshi Tyagi
Tag: MongoDB
02-Apr-2013