lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: getTimestamp method in IndexCommit
Date Wed, 03 Sep 2008 08:36:26 GMT

Noble Paul നോബിള്‍ नोब्ळ् wrote:

> On Tue, Sep 2, 2008 at 1:56 PM, Michael McCandless
> <> wrote:
>> Are you thinking this would just fallback to Directory.fileModified  
>> on the
>> segments_N file for that commit?
>> You could actually do that without any API change, because  
>> IndexCommit
>> exposes a getSegmentsFileName().
> If it is a RAMDirectory how can we get the lastmodified?

RAMDirectory will report the System.currentTimeMillis() when the file  
was last changed.  Is that not sufficient?

> Isn't it a lot of overhead to read the file modified time everytime
> the timestamp is tobe obtained?

I would think this method does not need to be super fast -- how  
frequently are you planning to call it?

Note that the segments_N file has no other means of extracting a  
timestamp for itself; it does not store a timestamp internally or  

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message