[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    Re: Reviving a dead index
From:       Michael McCandless <lucene () mikemccandless ! com>
Date:       2006-11-23 13:24:15
Message-ID: 4565A0FF.3050906 () mikemccandless ! com
[Download RAW message or body]

Aleksander M. Stensby wrote:

 > works like a charm Michael! (only thing is that SegmentInfos /
 > SegmentInfo are final classe, (which I didnt know) so i was bugging
 > around to really find the classes:) heh.
 >
 > I was able to remove the broken segment. I must now get the MAX(id) from
 > the clean remaining segments, then just regenerate from that point on.
 > (ive indexed the ids, so thats a good pinpoint.)
 >
 > Anyways, thanx! My logrotation was broken so was unable to trace back
 > the root cause, but will report if it happens again!

Super!  Phew.  Please reply back if you make any progress on the root
cause.  If it comes down to a bug in Lucene we've got to ferret it out
and get it fixed.

> One last thing... can i be sure that the latest inserted documents in 
> fact was inserted into that broken segment? Or are they placed randomly 
> in the different segments?

Well, when documents are added they are always added into the "latest"
segment (when the writer flushes its RAMDirectory buffer).  Then, on
merging/optimizing, this segment will be merged with others before
it.  If you are certain it is the "newest" (ie, biggest name in base
36) segment(s) that you've lost, and you add your docs in increasing ID
order, then I believe getting the max(ID) that's in the index and
re-indexing the docs above that will make your index complete
again.  Best to do some serious testing to be sure though :)

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic