Ejemplo n.º 1
0
        public void TestTermQueryWithDefaultIndex()
        {
            using (var index = TestHelper.PrepareIndexForSearch(new PersistentIndexName(TestFolder)))
            {
                using (var query = new TermQuery(TestHelper.GetPostingList(index, "this")))
                {
                    var result   = query.ExecuteToString();
                    var expected = "{[3,1,1]}, {[4,1,1]}, {[5,1,1]}, {[6,1,8]}";

                    Assert.Equal(expected, result);
                }
            }
        }