So on the mongodb-user group we get a question at least once a week from some one wishing to understand how to optimise paging for MongoDB. The most common variants are: Facebook like feeds Twitter like feeds Log pagination Historical Data Pagination Statistical Pagination Now first thing to remember in MongoDB is that some times [...]
Ok so you’ll remember some time ago I talked about realtime statistics in MongoDB, right? Well here is a working version. This script basically records the basic statistics on videos. So this time I am going to skip why and how I made my document structure and just show you my document structure: This may [...]
Just got a question on the MongoDB user group as which type of index over multiple fields would be best and why. The user basically had three fields: Type CompanyID Date And was wondering what the difference would be to using a compound index on all three fields and using a single key index per [...]
There is now an example of this sort of aggregation here: Realtime Stats in MongoDB Example (PHP) As I troll the MongoDB user group (mongodb-user) I notice a LOT of questions about realtime statisitics handling in Mongo. As I have repeated myself about 100 times over I will write a blog post about it. Many [...]
Please Note: This script is only designed to be for testing purposes. In reality Mongo is not really designed to do this and you would be much better off with a real search tech such as lucence/solr/elastic search/sphinx/xapian/or one of the many others out there The main file that controls the workings of the search: [...]