Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6700

Allow updates to expireAfterSeconds field for TTL indexes

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.3.2
    • 2.1.2
    • None

    Description

      This can be accomplished using the collMod command. The syntax for changing the value of the expireAfterSeconds field is:

      db.runCommand( {"collMod" : [collection] , "index" : { "keyPattern" : [indexPattern] , "expireAfterSeconds" : [newVal] } } )

      For instance:

      db.runCommand( {"collMod" : "foo" , "index" : { "keyPattern" : {a : 1} , "expireAfterSeconds" : 3600 } } )

      Attachments

        Activity

          People

            matulef Kevin Matulef
            matulef Kevin Matulef
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: