You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by cemerick <ce...@snowtide.com> on 2009/08/25 16:57:29 UTC

Purpose of the file modification date methods in Directory?

I've built a Lucene Directory implementation for jdbm, an embedded Java
database. Part of the Directory API are two methods related to "file"
modification dates: touchFile and fileModified. My question is, what is the
purpose of these methods? I've searched the Lucene core source tree, and
found no usage of these methods at all.

FWIW, my interest is the fact that I'd like to not bother tracking mod
dates, given that I'm using an embedded datastore, and such metadata isn't
"free" as it is in a regular filesystem.  My jdbm Directory impl seems to be
working just fine (with touchFile a no-op and fileModified always returning
0).

Thanks,

- Chas
-- 
View this message in context: http://www.nabble.com/Purpose-of-the-file-modification-date-methods-in-Directory--tp25136045p25136045.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Purpose of the file modification date methods in Directory?

Posted by cemerick <ce...@snowtide.com>.
Fair enough.  This Directory impl is really only useful in conjunction with
other usage of the jdbm embedded database -- I can't imagine people layering
other Lucene-dependent projects on top (like Solr or whatever).

I suppose if that time ever comes, I'll revisit the issue. :-)

- Chas


hossman wrote:
> 
> 
> : Right, and those methods (IndexReader.lastModified and
> : IndexCommit.lastModified) aren't used at all.  I guess what I meant to
> say
> 
> they aren't used internal in Lucene, but they are part of the public API, 
> so client code (apps built using Lucene) may expect them to work for their 
> own internal purposes.
> 
> 
> -Hoss
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Purpose-of-the-file-modification-date-methods-in-Directory--tp25136045p25250745.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Purpose of the file modification date methods in Directory?

Posted by Chris Hostetter <ho...@fucit.org>.
: Right, and those methods (IndexReader.lastModified and
: IndexCommit.lastModified) aren't used at all.  I guess what I meant to say

they aren't used internal in Lucene, but they are part of the public API, 
so client code (apps built using Lucene) may expect them to work for their 
own internal purposes.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Purpose of the file modification date methods in Directory?

Posted by cemerick <ce...@snowtide.com>.
Right, and those methods (IndexReader.lastModified and
IndexCommit.lastModified) aren't used at all.  I guess what I meant to say
originally was I had 'found no functional dependencies' on those methods on
Directory.

Thanks for the data point.

- Chas


Michael McCandless-2 wrote:
> 
> IndexReader.lastModified returns lastModified of the latest segments_N
> file.  Also, IndexCommit exposes a lastModified which is the
> lastModified of the segments_N file for that commit point.
> 
> Otherwise I don't think Lucene uses it elsewhere.
> 
> Mike
> 
> On Fri, Aug 28, 2009 at 12:19 PM, cemerick<ce...@snowtide.com> wrote:
>>
>> I just thought I'd ping the list once more on this question.  Any
>> thoughts?
>> If not, I'll leave well enough alone until something breaks... :-)
>>
>> Thanks much,
>>
>> - Chas
>>
>>
>> cemerick wrote:
>>>
>>> I've built a Lucene Directory implementation for jdbm, an embedded Java
>>> database. Part of the Directory API are two methods related to "file"
>>> modification dates: touchFile and fileModified. My question is, what is
>>> the purpose of these methods? I've searched the Lucene core source tree,
>>> and found no usage of these methods at all.
>>>
>>> FWIW, my interest is the fact that I'd like to not bother tracking mod
>>> dates, given that I'm using an embedded datastore, and such metadata
>>> isn't
>>> "free" as it is in a regular filesystem.  My jdbm Directory impl seems
>>> to
>>> be working just fine (with touchFile a no-op and fileModified always
>>> returning 0).
>>>
>>> Thanks,
>>>
>>> - Chas
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Purpose-of-the-file-modification-date-methods-in-Directory--tp25136045p25192797.html
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Purpose-of-the-file-modification-date-methods-in-Directory--tp25136045p25197062.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Purpose of the file modification date methods in Directory?

Posted by Michael McCandless <lu...@mikemccandless.com>.
IndexReader.lastModified returns lastModified of the latest segments_N
file.  Also, IndexCommit exposes a lastModified which is the
lastModified of the segments_N file for that commit point.

Otherwise I don't think Lucene uses it elsewhere.

Mike

On Fri, Aug 28, 2009 at 12:19 PM, cemerick<ce...@snowtide.com> wrote:
>
> I just thought I'd ping the list once more on this question.  Any thoughts?
> If not, I'll leave well enough alone until something breaks... :-)
>
> Thanks much,
>
> - Chas
>
>
> cemerick wrote:
>>
>> I've built a Lucene Directory implementation for jdbm, an embedded Java
>> database. Part of the Directory API are two methods related to "file"
>> modification dates: touchFile and fileModified. My question is, what is
>> the purpose of these methods? I've searched the Lucene core source tree,
>> and found no usage of these methods at all.
>>
>> FWIW, my interest is the fact that I'd like to not bother tracking mod
>> dates, given that I'm using an embedded datastore, and such metadata isn't
>> "free" as it is in a regular filesystem.  My jdbm Directory impl seems to
>> be working just fine (with touchFile a no-op and fileModified always
>> returning 0).
>>
>> Thanks,
>>
>> - Chas
>>
>
> --
> View this message in context: http://www.nabble.com/Purpose-of-the-file-modification-date-methods-in-Directory--tp25136045p25192797.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


Re: Purpose of the file modification date methods in Directory?

Posted by cemerick <ce...@snowtide.com>.
I just thought I'd ping the list once more on this question.  Any thoughts? 
If not, I'll leave well enough alone until something breaks... :-)

Thanks much,

- Chas


cemerick wrote:
> 
> I've built a Lucene Directory implementation for jdbm, an embedded Java
> database. Part of the Directory API are two methods related to "file"
> modification dates: touchFile and fileModified. My question is, what is
> the purpose of these methods? I've searched the Lucene core source tree,
> and found no usage of these methods at all.
> 
> FWIW, my interest is the fact that I'd like to not bother tracking mod
> dates, given that I'm using an embedded datastore, and such metadata isn't
> "free" as it is in a regular filesystem.  My jdbm Directory impl seems to
> be working just fine (with touchFile a no-op and fileModified always
> returning 0).
> 
> Thanks,
> 
> - Chas
> 

-- 
View this message in context: http://www.nabble.com/Purpose-of-the-file-modification-date-methods-in-Directory--tp25136045p25192797.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org