As of libraryDependencies += "org.reactivemongo" %% "play2-reactivemongo" % "0.20.3-play28"
1st define the index
val createdTSInx = Index(
key = Seq("createdTS" -> IndexType.Ascending),
name = Some("createdTSInx"),
unique = true,
background = false,
sparse = false,
expireAfterSeconds = None,
storageEngine = None,
weights = None,
defaultLanguage = None,
languageOverride = None,
textIndexVersion = None,
sphereIndexVersion = None,
bits = None,
min = None,
max = None,
bucketSize = None,
collation = None,
wildcardProjection = None,
version = None,
partialFilter = None,
options = BSONDocument.empty)
// to create
collection.indexesManager.create(createdTSInx)
//to ensure
collection.indexesManager.ensure(createdTSInx)