<p>MongoDB has a handy command to rename a collection, <a href="https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/">db.collectionName.renameCollection().</a> There is currently no equivalent to rename a database. Now if we accept that from time to time, one positively, absolutely just <strong>has</strong> to rename a database in MongoDB, well, there are a couple of options. Unfortunately they aren’t quite as straight forward as single MongoDB command. All methods…
<p>I’ve been meaning to post this link for quite a while now but keep forgetting to do so. If you are planning to store geospatial data in MongoDB, the database offers you a variety of ways to deal with geospatial-specific data storage and queries.</p>
<p>I will show you how to enable logging in the MongoDB Java driver and also how to set and change the log level. The <a href="https://mongodb.github.io/mongo-java-driver/">official mongoDB Java driver</a> uses <a href="https://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a> as its default logging framework or sl4j if the latter is present. It can be very useful to enable logging in the MongoDB drivers to trace how the driver is interacting with…
<p>I’m spending a lot of time in the MongoDB shell at the moment, so of course I went to see if someone had built an Emacs mode to support the MongoDB shell. Google very quickly pointed me at <a href="https://github.com/endofunky/inf-mongo">endofunky’s inf-mongo mode</a>, which implements a basic shell interaction mode with MongoDB using comint. We have a winner, well, almost. The mode does exactly what it says on the tin, but I wanted a little more, namely being able to scroll…