bring back ensureIndexes

Make sure indexes are created for commonly sought fields.