I want to create unique index to a collection using Mongo-Scala Driver. This driver is new and also I am new to Scala. I am not able to create index via both these two methods.
collQueries.createIndex(Document("name" -> 1, "unique" -> true))
And this:
collQueries.createIndex(Document("name" -> 1, "unique" -> true), IndexOptions())
Can anyone please help on how to create unique index in Mongo-Scala driver as it is very new and not much information is available.