Example #1
0
 public void SearchingWithDoubleDashesShouldWork()
 {
     using (var store = NewDocumentStore())
     {
         var index = new FooByBar();
         index.Execute(store);
         using (var session = store.OpenSession())
         {
             session.Store(new Foo {
                 Bar = "I should // be able to query this"
             });
             session.SaveChanges();
             WaitForIndexing(store);
             var res = session.Query <Foo>(index.IndexName).Search(x => x.Bar, "I should // be able to query this").Single();
         }
     }
 }
 public void CanQueryStopwordsWithPrefix()
 {
     using (var store = GetDocumentStore())
     {
         var index = new FooByBar();
         index.Execute(store);
         using (var session = store.OpenSession())
         {
             session.Store(new Foo {
                 Bar = "Andrew"
             });
             session.Store(new Foo {
                 Bar = "boo"
             });
             session.SaveChanges();
             Assert.Single(session.Query <Foo>("FooByBar").Search(x => x.Bar, "And*").Customize(x => x.WaitForNonStaleResults()).ToList());
         }
     }
 }