Searching for a case insensitive match in mongo is really simple, because it has full support for regular expression. As an example if you want to find all properties that is equal to a certain text with case insensitive search you can issue this query db.xxxx.find( { myProperty: /^text$/i } ); This query uses a […]

Continue reading about Insenstive search with Mongo with C# and LINQ provider

I’ve blogged about using MongoDb to store log4net logs, but the original appender has a little problem, it stores a BsonDocument inside the MongoCollection, and does not use any C# object and when it is time to query data you cannot use the new LINQ Mongo provider that is included in newest C# drivers (1.4), […]

Continue reading about Query untyped object inside a Mongo Db (log4net mongoappender)

One of the coolest feature of Mongo is the concept of Capped Collection, or “fixed size” collection. They are based on a FIFO queue where the first record to be discharded is the first inserted, and this is exceptional to create a log-collection that automatically purge all old logs without any user intervention. To be […]

Continue reading about Use Capped collection on MongoAppender for Log4Net

I’ve blogged some days ago on the possibility to save log4net logs inside a Mongo database, but you should be aware that this technique can be dangerous if your objects have circular references. A circular reference happens when object A reference object B and object B directly or indirectly reference object A again and this […]

Continue reading about Logging object with circular reference with Mongo Appender chrashes your process

As I showed in an old post, Mongo Db is perfect to store logs, but as everyone knows, log databases tend to become really big, especially if the verbosity level is high, so I usually schedule a process that deletes all log older than a certain date to free space in log databases. To cleanup […]

Continue reading about Keep your Mongo log database small deleting old logs