NHibernate.Search - async mode

Posted by Atul on Stack Overflow See other posts from Stack Overflow or by Atul
Published on 2010-04-16T07:17:23Z Indexed on 2010/04/16 7:23 UTC
Read the original article Hit count: 476

Filed under:

Hi,

I am using NHibernate Lucene search in my project.

Lucene.Net.dll - v - 2.3.1.3 NHibernate.dll - v - 2.1.0.4000

At this point I am trying to use async option for indexing and used following options

config.SetProperty(NHibernate.Search.Environment.WorkerExecution, "async");

config.SetProperty(NHibernate.Search.Environment.WorkerThreadPoolSize, "1");

config.SetProperty(NHibernate.Search.Environment.WorkerWorkQueueSize, "5000");

Questions 1) My initial index was not build with this option, when used these settings first time, I had error saying NHibernate.Search.dll not found. When I deleted existing index and then started working, it went fine. Do we need to rebuild indexes whenever we change config settings like above ? 2) How size of index should be interpreted; i.e. initially my index was about 400MB (build over the last few months), which I deleted. Later when I reindexed, the size of index went down to 5MB ! Search appear to be alright after limited testing, but such a change appeared bit scary. Should we delete/rebuild indexes once in a while & is it normal to change this drastically ? 3) Is my above setting is OK ? When I had WorkerThreadPoolSize=5, I once got Dr Watson kind of error.

Please advise on best practices of using async configuration for search.

Regards, Atul

© Stack Overflow or respective owner

Related posts about nhibernate.search