Hello again, I'm trying to add a unique index but ...
# kmongo
s
Hello again, I'm trying to add a unique index but getting an error. Tried this code........ val users = db.getCollection<User>().createIndex(User::email, indexOptions = IndexOptions().unique(true)) but it doesn't like it. 😞
r
ensureIndex
s
ah I think I know where I've gone wrong. This is a method for checking the collection where I was looking for a way to create a collection with the index