mongo version - 4.0
When I create the TTL index throws out ( [js] SyntaxError: illegal character) error.
below command fails to create the TTL.
db.eventLog.createIndex({"updatedDate": 1}, {expireAfterSeconds:15552000<U+202C> } )
db.eventLog.createIndex({"updatedDate":1}, {expireAfterSeconds: 15552000<U+202C>,background:true})
db.eventLog.createIndex({ "updatedDate" : 1}, {background:true,"name" : "updatedDate",expireAfterSeconds: NumberLong(15552000<U+202C>)})
but when I change the expireAfterSeconds value from 15552000 to 3888000 create TTL success.
or change to those command create TTL success, but show the index seems very strange.
db.eventLog.createIndex({ "updatedDate" : 1}, {background:true,"name" : "updatedDate",expireAfterSeconds: { $numberLong: "15552000<U+202C>" }})
{
"v" : 2,
"key" : {
"updatedDate" : 1
},
"name" : "updatedDate_1",
"ns" : "bccd_asset_connector.eventLog",
"expireAfterSeconds" : { $numberLong: "15552000<U+202C>" },
"background" : true
}
db.eventLog.createIndex({"updatedDate": 1}, { "expireAfterSeconds": "15552000<U+202C>", background: true })
{
"v" : 2,
"key" : {
"updatedDate" : 1
},
"name" : "updatedDate_1",
"ns" : "bccd_asset_connector.eventLog",
"expireAfterSeconds" : "15552000<U+202C>",
"background" : true
}
