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

Allow updates to expireAfterSeconds field for TTL indexes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.3.2
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: