Explore MongoDB 2.3 on MongoHQ

There are some interesting and exciting changes coming to MongoDB in the 2.4 production release, including:

We’ll talk a bit more about these changes in just a moment, but first, we wanted to give our customers a way to try out the new features, even though they are in the 2.3 development release. You can do this by doing the following:

  1. Log into MongoHQ
  2. Create a new sandbox databases with the “Dharma 2.3 Experimental” option
  3. Insert data
  4. Make profit

Now that you are all set and have your experimental database provisioned and ready to go, let’s talk about a couple of the new features.

Full-text Search

10gen has pointed out on numerous occasions that this has been one of the most-requested features on the MongoDB roadmap, so the engineers are pretty stoked to finally offer it.

However, it is still highly experimental. Good to explore, but do not use it on production environments.

If you had a collection of emails with a field called email_body, you can add the following index:

db.emails.ensureIndex({email_body:text}, {name:"email_body_text_index")  

Allow the index to build and from there, you should be good to start testing queries against it. A query may look like:

db.emails.runCommand( "text", {search: "Pho"} )  

This will return a BSON document … not a cursor. So, a bit of a change there.

This should get you started … there are a number of additional features and options that you can use when querying. For more information about doing text queries with this new functionality, check out the release notes for MongoDB 2.3.

Changes to the Javascript Engine

With the 2.3/2.4 release of MongoDB, 10gen is replacing Mozilla’s Spidermonkey javascript engine with Google’s open-source V8 engine. While there are some speed improvements in various cases, the details of this change are probably a bit out of the realm of the interest of most people using MongoDB as a database.

Nevertheless, it is a worthwhile endeavor to benchmark some of your map reduce functionality against this new version of MongoDB as compared to 2.2 versions of the code.

That’s It

We hope you have fun testing this developmental release of MongoDB. Please do not use this environment for anything production-related. If you have any questions, we’re happy to help!