c# 4.0 - How to tackle/fix SimpleFSLock in Lucene -



c# 4.0 - How to tackle/fix SimpleFSLock in Lucene -

i error when update or add together lucene documnet. know happens when indexwriter beingness used other resource simplefslock excetion , in scenario close indexwriter there no chance of indexwriter beingness opened.

is there way if exception can prepare this.

edit :

static object mylock = new object(); public static void adddocument(//some params) { lock (mylock) { seek { //i exception thrown on below line [not sure might file have been locked due other resource accessing : how can free lock] indexwriter author = new indexwriter(getfileinfo(indexname), analyzer, false); writer.adddocument(*//some document //*); writer.optimize(); writer.close(); } grab (exception ex) { log.logwarn(null, ex.message); } } }

"but in scenario close indexwriter there no chance of indexwriter beingness opened" wouldn't sure!

c#-4.0 lucene.net

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -