public LuceneIndexWriterProvider(
     ILuceneDirectoryProvider directoryProvider,
     ILuceneAnalyzerProvider analyzerProvider)
 {
     IndexWriter = new Lazy <IndexWriter>(() =>
     {
         return(new IndexWriter(
                    directoryProvider.GetDirectory(),
                    analyzerProvider.GetAnalyzer(),
                    Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED));
     });
 }
示例#2
0
 public LuceneIndexReaderProvider(ILuceneDirectoryProvider directoryProvider)
 {
     IndexReader = new Lazy <IndexReader>(() => Lucene.Net.Index.IndexReader.Open(directoryProvider.GetDirectory(), true));
 }