Exemplo n.º 1
0
        public void All(string[] documents, string[] terms, int[] expectedResults)
        {
            var index   = new Indexer().CreateIndex(documents);
            var seacher = new Searcher(index);

            var results = seacher.Search(Query.All(
                                             terms.Select(t => TermQuery.From(t, DefaultAnalyzer.Instance)))
                                         ).ToArray();

            Assert.Equal(expectedResults, results);
        }