コード例 #1
0
        public TopDocs SearchIndex(string term)
        {
            Query       query       = parser.Parse(term);
            PhraseQuery phraseQuery = parser.PhraseSlop(term);

            Lucene.Net.Search.TopDocs topDocs = searcher.Search(query, 10);
            Console.WriteLine(topDocs.TotalHits + " documents has been returned.");
            return(topDocs);
        }