Going for the segments file like that is not a recommended practise, or
at least not something I'd recommend.  'segments' file is really
something that a caller should not know anything about.  Once day
Lucene may choose to rename the segments file or some such, and the
code that uses this trick will break.

To answer the original question, yes, I think it would be handy to have
this method back.  Perhaps we should revive it/them, ha?

Otis


--- Chris Hostetter <[EMAIL PROTECTED]> wrote:

> 
> : Why IndexReader.lastModified(index) is depricated?
> 
> Did you read the javadocs?
> 
>    Synchronization of IndexReader and IndexWriter instances is no
> longer
>    done via time stamps of the segments file since the time
> resolution
>    depends on the hardware platform. Instead, a version number is
>    maintained within the segments file, which is incremented
> everytime
>    when the index is changed.
> 
> : It's always a good idea to know when the index changed last time,
> for
> 
> That's a good point, and you can still get that information using the
> same
> underlying method IndexReader.lastModified did/does...
> 
>      directory.fileModified("segments");
> 
> ...it's just no longer crucial that IndexReader have that
> information.
> 
> 
> 
> -Hoss
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to