Mongodb 2.6 upgrade

2014/8/21 min read
bookmark this
Responsive image

I have noticed that I've been using Mongodb 2.4, text-search is beta. Some code like following is not going to work. outputDeal is null.

  mycollection.textSearch(req.body.searchBox, searchOpt, function (err, outputDeal) {
        var result = inspect(outputDeal, { depth: null });
        console.info(result);
    })

MongoDB 2.6 has more feature, see following for reference.
MongoDB 2.6 is now available. Key features include aggregation enhancements, text-search integration, query-engine improvements, a new write-operation protocol, and security enhancements.

SO this blog provide how to upgrade from 2.4 to 2.6 by following steps.

  1. dump your mongodb data
  2. download binary 2.6 file.
  3. stop all service, app using the mongodb
  4. go to mongo bin folder and replace all the dll by using the new 2.6 dll.
  5. restart all service, app using the mongodb.
  6. you should be able to verify 2.6 by type db.version()

after I change in above steps, I could verify my first text search query is working now.