lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <scott.ga...@eTapestry.com>
Subject RE: IndexReader.lastModified() not correct
Date Wed, 07 Aug 2002 18:14:30 GMT
> I have only one question:
> is it faster to iterate on segments:
>   SegmentInfos infos = new SegmentInfos();
>     infos.read(directory);
> 
> or you could use directory.list() and check the file extensions?

This is very fast, I think.  If you dig into the code, there is very little
that it needs to do to determine the segments.  I admit, though, that I
haven't done any performance comparisons between this version and doing a
directory list()...

Scott

> -----Original Message-----
> From: Halácsy Péter [mailto:halacsy.peter@axelero.com]
> Sent: Wednesday, August 07, 2002 12:52 PM
> To: Lucene Developers List
> Subject: RE: IndexReader.lastModified() not correct
> 
> 
> 
> 
> > -----Original Message-----
> > From: Scott Ganyo [mailto:scott.ganyo@eTapestry.com]
> > Sent: Wednesday, August 07, 2002 7:41 PM
> > To: 'Lucene Developers List'
> > Subject: RE: IndexReader.lastModified() not correct
> 
> > P.S. I don't know if this could have caused your Exception.  
> > I actually
> > can't think of a scenario off-hand where you would get that 
> > Exception except
> > in a corrupt index...  is your index intact?
> > 
> 
> I implemented the worst solution. I've checked the 
> modification time of the directory containing my index. It's 
> good on windows but not on unix. now I'll use your code.
> 
> I have only one question:
> is it faster to iterate on segments:
>   SegmentInfos infos = new SegmentInfos();
>     infos.read(directory);
> 
> or you could use directory.list() and check the file extensions?
> 
> peter
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message