{"action":"created","issue":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/73","labels_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/73/comments","events_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/73/events","html_url":"https://github.com/jagi/meteor-astronomy/issues/73","id":101825028,"number":73,"title":"Index creation issue.","user":{"login":"ansarizafar","id":5788284,"avatar_url":"https://avatars.githubusercontent.com/u/5788284?v=3","gravatar_id":"","url":"https://api.github.com/users/ansarizafar","html_url":"https://github.com/ansarizafar","followers_url":"https://api.github.com/users/ansarizafar/followers","following_url":"https://api.github.com/users/ansarizafar/following{/other_user}","gists_url":"https://api.github.com/users/ansarizafar/gists{/gist_id}","starred_url":"https://api.github.com/users/ansarizafar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansarizafar/subscriptions","organizations_url":"https://api.github.com/users/ansarizafar/orgs","repos_url":"https://api.github.com/users/ansarizafar/repos","events_url":"https://api.github.com/users/ansarizafar/events{/privacy}","received_events_url":"https://api.github.com/users/ansarizafar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-19T07:29:16Z","updated_at":"2015-08-26T07:35:53Z","closed_at":null,"body":"I am trying to create index on a field in my schema\r\n```\r\nBizTypes = new Mongo.Collection('biztypes');\r\n\r\nBizType = Astro.Class({\r\n    name: 'BizType',\r\n    collection: BizTypes,\r\n    fields: {\r\n        typeName: {\r\n            type: 'string',\r\n            index: 1,\r\n            validators: [\r\n                Validators.required(),\r\n                Validators.string(),\r\n                Validators.maxLength(40)\r\n            ]\r\n        }\r\n    }\r\n});\r\n```\r\nWhen a save new document by using BizType.save()  no index is created on typeName field in MongoDb collection. Please help me resole this issue."},"comment":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/comments/134878207","html_url":"https://github.com/jagi/meteor-astronomy/issues/73#issuecomment-134878207","issue_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/73","id":134878207,"user":{"login":"jagi","id":1051229,"avatar_url":"https://avatars.githubusercontent.com/u/1051229?v=3","gravatar_id":"","url":"https://api.github.com/users/jagi","html_url":"https://github.com/jagi","followers_url":"https://api.github.com/users/jagi/followers","following_url":"https://api.github.com/users/jagi/following{/other_user}","gists_url":"https://api.github.com/users/jagi/gists{/gist_id}","starred_url":"https://api.github.com/users/jagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagi/subscriptions","organizations_url":"https://api.github.com/users/jagi/orgs","repos_url":"https://api.github.com/users/jagi/repos","events_url":"https://api.github.com/users/jagi/events{/privacy}","received_events_url":"https://api.github.com/users/jagi/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T07:35:53Z","updated_at":"2015-08-26T07:35:53Z","body":"Have you tried using the `Collection._ensureIndex` directly? Does it create index?\r\n\r\nIf yes could you create reproduction repository, so I would be able to work on the same code as you."}}