http://home.cnblogs.com/group/topic/4683.html
可以参考下
//ProductAnalyzer.GenerateAnalyzer();
Analyzer analyzer = new StandardAnalyzer();
IndexSearcher searcher = new IndexSearcher("分词后存放路径");
MultiFieldQueryParser parser = new MultiFieldQueryParser(new string[] { "title", "content" }, analyzer);
Query query = parser.Parse("关键字");
Hits hits = searcher.Search(query);
for (int i = 0; i < hits.Length(); i++)
{
Document doc = hits.Doc(i);
Console.WriteLine(string.Format("title:{0} content:{1}", doc.Get("title"), doc.Get("content")));
}
searcher.Close();
Console.ReadKey();
看这篇,很容易搞的。
http://www.cnblogs.com/eaglet/archive/2010/05/13/1734273.html