I see that we can add an index by simply specifying the name of the field:
library(mongolite)
m <- mongo()
m$index("field")
How do we specify a unique index? ie:
db.members.createIndex( { "field": 1 }, { unique: true } )
I see that we can add an index by simply specifying the name of the field:
library(mongolite)
m <- mongo()
m$index("field")
How do we specify a unique index? ie:
db.members.createIndex( { "field": 1 }, { unique: true } )