lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Reviving a dead index
Date Thu, 23 Nov 2006 13:24:15 GMT
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


Mime
View raw message