public void Test_speed_of_query_with_index() { using (var documentDb = new DocSharp(DbName)) { documentDb.Index<Company>(q => q.Name); for (int i = 0; i < 1000; i++) { documentDb.Store(new Company { Name = "Company Name " + i}); } for (int i = 0; i < 1000; i++) { documentDb.Store(new Contact { FirstName = "Andrew", Surname = "Stewart"}); } for (int i = 0; i < 500; i++) { documentDb.Store(new Company { Name = "Company Name World" + i }); } for (int i = 0; i < 1000; i++) { documentDb.Store(new Contact { FirstName = "Bob", Surname = "Smith" }); } for (int i = 0; i < 1000; i++) { documentDb.Store(new Company { Name = "Company Name " + i }); } var startTime = DateTime.Now; var documentsFound = documentDb.Query<Company>(q => q.Name.Contains("World")); var timeQueryTaken = DateTime.Now.Subtract(startTime); Console.WriteLine("Query Time (ms)- " + DateTime.Now.Subtract(startTime).TotalMilliseconds); Assert.AreEqual(500, documentsFound.Count); Assert.IsTrue(timeQueryTaken.TotalMilliseconds <= 500); } }