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
rocketraman
02/14/2023, 4:20 PM
ensureIndex
s
Stephen
02/15/2023, 12:47 PM
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