lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Bressler <eric.bress...@coreblox.com>
Subject RE: Corrupted indexes
Date Tue, 30 Aug 2005 11:43:23 GMT
I was going to send out the answer to this problem this morning. I found
it around 2am last night.  I was mistaken that I had corrupt the
indexes.  The real problem was that I had forgotten the constructor I
was using for the index reader an had it like 

writer = new IndexWriter(indexlocation, new StandardAnalyzer(), true);

instead of 

if ( !IndexReader.indexExists(indexlocation)) {
       writer = new IndexWriter(indexlocation, new StandardAnalyzer(),
true);
}				
else
	writer = new IndexWriter(indexlocation, new StandardAnalyzer(), false);


So I was basically always making a new index.  Really a beginner mistake
but I had written that portion so long ago I didn't look.

Eric


On Tue, 2005-08-30 at 12:23 +0200, Peter Veentjer - Anchor Men wrote:
> What kind of corruption do you get? Do the files get corrupted
> (unusable/unreadable), or do you get multiple items in the index? 
> 
> -----Oorspronkelijk bericht-----
> Van: Eric Bressler [mailto:eric.bressler@coreblox.com] 
> Verzonden: maandag 29 augustus 2005 23:18
> Aan: java-user@lucene.apache.org
> Onderwerp: Corrupted indexes
> 
> I am running lucene 1.4.3 and I have a situation where after adding and
> removing some objects, my index becomes corrupt.  I have been careful to
> make sure that all adds and removes happen in a single thread (although
> I know that isn't necessarly needed) and it still occurs.  I am not sure
> how to go about debugging the index corruption, so any pointers will be
> welcome.  Oh, this only appears to happen when the index and removals
> happen rapidly.  I cannot do it when there are all adds or removals w/o
> it being a rapid change between adds and removes.
> Thanks
> 
> Eric
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 


---------------------------------------------------------------------
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