|
Hello compchap_nikhil,
Thank you for the report. Looking over the output provided, it appears that the index was created with expireAfterSeconds as part of the key instead of being passed as an option. In the output you've provided, expiresAfterSeconds appears to be under key, however when passing it as an option, it would be on the same level as the key object:
(mongod-3.4.2) test> db.test.createIndex({"3":1}, {expireAfterSeconds: 3600,name: "test3"})
|
{
|
"createdCollectionAutomatically": false,
|
"numIndexesBefore": 3,
|
"numIndexesAfter": 4,
|
"ok": 1
|
}
|
(mongod-3.4.2) test> db.test.getIndexes()
|
[
|
{
|
"v": 2,
|
"key": {
|
"3": 1
|
},
|
"name": "test3",
|
"ns": "test.test",
|
"expireAfterSeconds": 3600
|
}
|
]
|
Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.
Thanks,
Mark
|