It sounds like you're using a pre-2.1 Lucene version?

Prior to 2.1, Lucene wrote segments.new, then removed segments, then renamed segments.new to segments. So it's actually normal that segments is deleted and then quickly replaced, when closing IndexWriter, and it seems like your breakpoint may accidentally be triggering during this 'normal' time. It may be best to turn off the breakpoint, turn infoStream on, and get the error to happen? Or maybe change the criteria of your breakpoint: if IndexWriter is closed and segments does not exist, then break?

Do you have an IndexReader open on the same index? If so, those errors from the infoStream are normal.

Mike

adakos wrote:


Right, got some interesting information.

The error occurred. The segments file was gone, I had a debug break
trigger(when it pauses the program while its running) as soon as it detected the file was missing, so I checked inside the index folder and found that
there was a segments.new file there instead of segments. I renamed
segments.new to segments stopped the "live pause" that comes with c# and its
continuing to run at the moment.

I can confirm that the segments file disappeared upon closing the
IndexWriter, not when it gets opened.

And below is (some) of the infoStream text (its 519 pages long so didnt think it would be wise to post all of it). The messages below were the ones that looked relevant, there is either information about documents being merged or these errors as shown below. If you need the whole thing I can
send it to you.



System.IO.IOException: The process cannot access the file
'C:\Skyword.Server\Data\Index\_lug1.cfs' because it is being used by another
process. at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) at System.IO.File.Delete(String path) at
Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
deletable); Will re-try later.

System.IO.IOException: The process cannot access the file
'C:\Skyword.Server\Data\Index\_lulm.cfs' because it is being used by another
process. at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) at System.IO.File.Delete(String path) at
Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
deletable); Will re-try later.

System.IO.IOException: The process cannot access the file
'C:\Skyword.Server\Data\Index\_lur7.cfs' because it is being used by another
process. at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) at System.IO.File.Delete(String path) at
Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
deletable); Will re-try later.

System.IO.IOException: The process cannot access the file
'C:\Skyword.Server\Data\Index\_luws.cfs' because it is being used by another
process. at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) at System.IO.File.Delete(String path) at
Lucene.Net.Store.FSDirectory.DeleteFile(String name) at
Lucene.Net.Index.IndexWriter.DeleteFiles(ArrayList files, ArrayList
deletable); Will re-try later.

--
View this message in context: 
http://www.nabble.com/Segments-file-disappears%2C-index-no-longer-functions.-tp21579880p21587130.html
Sent from the Lucene - General mailing list archive at Nabble.com.


Reply via email to