IndexWritters are not initialized appropriately

Description

Class DirectoryFactoryProvider does not parse IndexWriter settings from config appropriately. It leads to IndexWritter to be always initialized with default parameters which are: MergeFactor=10, MaxBufferedDocs=10, MaxMergeDocs=int.MinValue. Value of MaxMergeDocs is vital for Lucene.Net. In Lucene.Net my default its value is int.MaxValue and Nhibernate.Search replaces it with int.MinValue. When not configured correctly IndexWriter does not merge segments and it leads to very poor performance when removing documents from an index due to large number of segments in index. See attachment application. On my machine the default settings it runs for 7 minutes 40 secods (250 segments, 501 file in index), whereas with MaxMergeDocs=10000 it runs in 1 minute 12 seconds (11 segments, 23 files in index).

Environment

None

Attachments

1

Activity

Show:

Fabio Maulo 
January 28, 2011 at 2:13 PM

Released 2.0.1

PaulP 
July 25, 2009 at 11:15 AM

Now reads MergeFactor, MaxMergeDoics and MaxBufferedDocs for transaction and batch

Nekrasov Aleksandr 
July 24, 2009 at 4:05 AM

ive found that there is branch "nh-search-big-port-from-hs-r15224" containing with the changes required. so i guess that branch should be just merged to the trunk

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created July 7, 2009 at 4:05 AM
Updated January 28, 2011 at 2:13 PM
Resolved July 25, 2009 at 11:15 AM
Who's Looking?