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