{"action":"created","issue":{"url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/42","labels_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/42/comments","events_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/42/events","html_url":"https://github.com/michalmuskala/mongodb_ecto/issues/42","id":111111865,"number":42,"title":"Question: Adding indexes","user":{"login":"vitalis","id":36814,"avatar_url":"https://avatars.githubusercontent.com/u/36814?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalis","html_url":"https://github.com/vitalis","followers_url":"https://api.github.com/users/vitalis/followers","following_url":"https://api.github.com/users/vitalis/following{/other_user}","gists_url":"https://api.github.com/users/vitalis/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalis/subscriptions","organizations_url":"https://api.github.com/users/vitalis/orgs","repos_url":"https://api.github.com/users/vitalis/repos","events_url":"https://api.github.com/users/vitalis/events{/privacy}","received_events_url":"https://api.github.com/users/vitalis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-13T06:01:58Z","updated_at":"2015-10-13T09:12:47Z","closed_at":"2015-10-13T09:12:47Z","body":"Hi,\r\nI don't see any docs on adding indexes, can you please help?"},"comment":{"url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/comments/147657050","html_url":"https://github.com/michalmuskala/mongodb_ecto/issues/42#issuecomment-147657050","issue_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/42","id":147657050,"user":{"login":"michalmuskala","id":477062,"avatar_url":"https://avatars.githubusercontent.com/u/477062?v=3","gravatar_id":"","url":"https://api.github.com/users/michalmuskala","html_url":"https://github.com/michalmuskala","followers_url":"https://api.github.com/users/michalmuskala/followers","following_url":"https://api.github.com/users/michalmuskala/following{/other_user}","gists_url":"https://api.github.com/users/michalmuskala/gists{/gist_id}","starred_url":"https://api.github.com/users/michalmuskala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalmuskala/subscriptions","organizations_url":"https://api.github.com/users/michalmuskala/orgs","repos_url":"https://api.github.com/users/michalmuskala/repos","events_url":"https://api.github.com/users/michalmuskala/events{/privacy}","received_events_url":"https://api.github.com/users/michalmuskala/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T09:12:47Z","updated_at":"2015-10-13T09:12:47Z","body":"I think the most straightforward way would be to do this from mongo console.\r\n\r\nThat being said, we support using Ecto's migrations for adding indexes - it should work like with any other database (having in mind that other migration options like creating tables make no sense for MongoDB). You can find more documentation on this here: https://hexdocs.pm/ecto/Ecto.Migration.html#index/3\r\n\r\nIf you'll still have some problems or you encounter some issues, please report back :smiley: "}}