由IIS 7和全局变量(单例)托管的WCF服务
在我的情况下,我使用Lucene.Net进行搜索,并希望使用IndexReader和IndexSearcher的单个实例。我应该从哪个方法移动它们,以便能够为第一个查询实例化一次,然后重用。
public static List<MyType> GetIndexMatches(string fullTextIndexPath, string keyWord )
{
IndexSearcher searcher = null;
IndexReader reader = null;
try
{
searcher = new IndexSearcher(fullTextIndexPath);
reader = IndexReader.Open(fullTextIndexPath);
...
没有找到相关结果
已邀请:
2 个回复
布埃郝卞簿
徐百晴墓斜