{"action":"created","issue":{"url":"https://api.github.com/repos/go-mgo/mgo/issues/103","repository_url":"https://api.github.com/repos/go-mgo/mgo","labels_url":"https://api.github.com/repos/go-mgo/mgo/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/go-mgo/mgo/issues/103/comments","events_url":"https://api.github.com/repos/go-mgo/mgo/issues/103/events","html_url":"https://github.com/go-mgo/mgo/issues/103","id":76159585,"number":103,"title":"Unable to create an expire at TTL index","user":{"login":"minyoung","id":126625,"avatar_url":"https://avatars.githubusercontent.com/u/126625?v=3","gravatar_id":"","url":"https://api.github.com/users/minyoung","html_url":"https://github.com/minyoung","followers_url":"https://api.github.com/users/minyoung/followers","following_url":"https://api.github.com/users/minyoung/following{/other_user}","gists_url":"https://api.github.com/users/minyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/minyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minyoung/subscriptions","organizations_url":"https://api.github.com/users/minyoung/orgs","repos_url":"https://api.github.com/users/minyoung/repos","events_url":"https://api.github.com/users/minyoung/events{/privacy}","received_events_url":"https://api.github.com/users/minyoung/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-05-13T23:24:49Z","updated_at":"2016-04-13T16:16:53Z","closed_at":"2015-05-14T03:33:27Z","body":"Trying to create an index with `ExpireAfter: 0` results in the `expireAfterSeconds` option not being applied.\r\n\r\nRelevant documentation: http://docs.mongodb.org/manual/tutorial/expire-data/#expire-documents-at-a-specific-clock-time\r\n\r\nMy guess is that the `omitempty` bson tag option is preventing the `0` value from being sent to mongo when creating the index. There doesn't seem to be an easy way of supporting this without changing the struct/API in some way?"},"comment":{"url":"https://api.github.com/repos/go-mgo/mgo/issues/comments/209528513","html_url":"https://github.com/go-mgo/mgo/issues/103#issuecomment-209528513","issue_url":"https://api.github.com/repos/go-mgo/mgo/issues/103","id":209528513,"user":{"login":"ergoz","id":805154,"avatar_url":"https://avatars.githubusercontent.com/u/805154?v=3","gravatar_id":"","url":"https://api.github.com/users/ergoz","html_url":"https://github.com/ergoz","followers_url":"https://api.github.com/users/ergoz/followers","following_url":"https://api.github.com/users/ergoz/following{/other_user}","gists_url":"https://api.github.com/users/ergoz/gists{/gist_id}","starred_url":"https://api.github.com/users/ergoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ergoz/subscriptions","organizations_url":"https://api.github.com/users/ergoz/orgs","repos_url":"https://api.github.com/users/ergoz/repos","events_url":"https://api.github.com/users/ergoz/events{/privacy}","received_events_url":"https://api.github.com/users/ergoz/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T16:16:53Z","updated_at":"2016-04-13T16:16:53Z","body":"@niemeyer when you will include in main repo fix by @tmc ? I think it could be great. Because it is big problem now, and dificult to find fix. I spent a lot of time to find it.\r\nSorry for bad english :) "}}