Skip to content

Commit bc754de

Browse files
committed
Updating FSDirectoryProvider for Lucene 2.9.4.2
1 parent 803214d commit bc754de

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/NHibernate.Search/Store/FSDirectoryProvider.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ public void Initialize(String directoryProviderName, IDictionary<string, string>
2929
bool create = !IndexReader.IndexExists(indexDir.FullName);
3030
indexName = indexDir.FullName;
3131
directory = FSDirectory.GetDirectory(indexName, create);
32+
3233
if (create)
3334
{
34-
IndexWriter iw = new IndexWriter(directory, new StandardAnalyzer(), create);
35+
IndexWriter iw = new IndexWriter(directory,
36+
new StandardAnalyzer(),
37+
create,
38+
new KeepOnlyLastCommitDeletionPolicy(),
39+
IndexWriter.MaxFieldLength.UNLIMITED);
3540
iw.Close();
3641
}
42+
3743
//searchFactory.RegisterDirectoryProviderForLocks(this);
3844
}
3945
catch (IOException e)

0 commit comments

Comments
 (0)