Using C # driver v1.9.0 (latest at time of writing) with MongoDB 2.6.0
What is the best way to create a text index in a collection using a C # driver?
From what I could say is this impossible through MongoCollection.CreateIndex? So, currently creating it using MongoDatabase.Eval as follows:
Database.Eval(new EvalArgs { Code = "function(){db.dummycollection.ensureIndex({\"$**\" : \"text\"},{name:\"TextIndex\"});}"
Am I missing something / is there a better way?
source
share