Lucene.net and Threading

Hey all,

Anybody has experience with Lucene.Net running on jodo using multi-threading?

Basically I implemented Lucene.Net for my application and I was able to Index and search for everything just fine without dealing with multi-threading.

Now with some modifications (base on others suggestions using multi-threading), I ran the indexing functions by initiate it in a thread like the following

System.Threading.Thread schedulerThread = null;
Scheduler scheduler = new Scheduler();
System.Threading.ThreadStart myThreadStart =
                  new System.Threading.ThreadStart(scheduler.Start);
                schedulerThread = new System.Threading.Thread(myThreadStart);
                schedulerThread.Start();

“scheduler.start” is my indexing function, but when I ran the above coding on jodo, I always get the exception

Lucene.Net.Store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock

Sometimes, after ran it couple of times, the server basically gives up on me all together.

Any suggestion is greatly appreciate it.

Thanks

trying to look this up is looks to be a common issue, I am not sure what causes it just yet.

Thanks Stephen.

The code works on my local machine, and it’s not a medium trust for sure. It might have something to do the number of threads available in an application domain of a shared host. Looks like I’ll have to think of some other way around it.

Thanks anyway.

Problem solved.

It actually has to do with the new thread not having the proper permission.

Please see here for the solution

http://stackoverflow.com/questions/1123517/lucene-net-and-i-o-threading-issue/1123981#1123981