Beispiel #1
0
        public void TestTextAll()
        {
            var    key      = IndexKeys.TextAll();
            string expected = "{ \"$**\" : \"text\" }";

            Assert.AreEqual(expected, key.ToJson());
        }
Beispiel #2
0
 public MongoIndexKeysWarpper TextAll()
 {
     if (MongoIndexKeys == null)
     {
         MongoIndexKeys = IndexKeys.TextAll();
     }
     else
     {
         MongoIndexKeys = MongoIndexKeys.TextAll();
     }
     return(this);
 }
 public void EnsureIndexExists()
 {
     collection.CreateIndex(IndexKeys.TextAll(), IndexOptions.SetName("Searchable").SetBackground(true));
 }