MongoDB index changes



  • There has been some changes in indexes between 0.5.x and master(soon to be 0.5.1) so when you update to master or 0.5.1 you should drop the indexes on the objects collection to save some space. To drop all the indexes on the objects collection just run db.objects.dropIndexes() from mongo shell and restart NodeBB, the new indexes will be created. You can check if everything is OK by running db.objects.stats(). The output should look like the following

    {
    ...
      "indexSizes": {
        "_id_": 433328,
        "expireAt_1": 310688,
        "_key_1_score_-1": 678608,
        "_key_1_value_-1": 629552
      },
    ...
    }
    


  • @baris I went ahead and followed your instructions, but have one question:

    Is this necessary, or does it just free up a bit of space?



  • It's not a must, but doing it will save quite a bit of space when your forum gets large.


Log in to reply
 

Suggested Topics

| |