MongoDB index changes

NodeBB Development
  • NodeBB
    #1

    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
      },
    ...
    }
    
  • #2

    @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?

  • NodeBB
    #3

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


Suggested Topics

  • 0 Votes
    5 Posts
    335 Views

  • 0 Votes
    7 Posts
    734 Views

  • 2 Votes
    5 Posts
    1002 Views

  • MongoDB Structure

    Unsolved NodeBB Development
    0 Votes
    10 Posts
    5576 Views

  • 0 Votes
    5 Posts
    3327 Views

| | | |