hardywang
hardywang

Reputation: 5162

NHibernate Search and Lucene Exception

Got error message when one application is using Lucene index exclusively.

Unhandled Exception: NHibernate.Search.Impl.SearchException: Unable to open IndexWriter for My namespace ---> Lucene.Net.Store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock My Index Path\write.lock

I am just wandering if any of you experienced same problem before?

Upvotes: 0

Views: 266

Answers (1)

Jf Beaulac
Jf Beaulac

Reputation: 5246

You probably crashed while the IndexWriter was opened, and the write.lock file was left in the index directory. This file is used by the SimpleFSLockFactory to make sure there is a single IndexWriter opened against a filesystem index at any given time.

Go into your index directory, and delete the write.lock file if NHibernate doesnt deal with it automatically.

Upvotes: 2

Related Questions