Everyone thinks of creating index, but nobody pays attention towards removing them once they are created and not required .Too many indexes or unnecessary index can degrade your DB performance. To Optimize indexes in mongo we need to understand following things : How indexes works in mongoDB: Let’s say we have created compound...
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...
Groovier way of finding index of element from Map. It can be obtained with findIndexOf Method, which accepts closure as argument. [groovy] Map map=["groovy":1,"grails":2,"index":3,"element":4] assert 3 == map.findIndexOf{it.key=="element"} assert 0...