예제 #1
0
        protected void AssertIndices(ISearchableIndex <string> expected, ISearchableIndex <string> actual)
        {
            foreach (var word in IndexHelper.Results.Keys)
            {
                Assert.Equal(expected.Search(word), actual.Search(word));
                Assert.Equal(expected.GetCount(word), actual.GetCount(word));
            }

            Assert.Equal(expected.GetAll(), actual.GetAll());
            Assert.Equal(expected.GetCount(), actual.GetCount());
        }
예제 #2
0
 public BooleanSearchEngine(ISearchableIndex <T> index, Func <string, T> tokenConvertor)
 {
     this.index          = index;
     this.tokenConvertor = tokenConvertor;
 }