Move index creation into mongo crud