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 lingaraju <li...@infactindia.com> on 2004/07/27 12:46:52 UTC

Time of last insert

Dear  All

How to know that, when(lastmodified time) last document is added to in index

Thanks and regards
Raju

Re: Time of last insert

Posted by lingaraju <li...@infactindia.com>.
But  that method is "deprecated" and Replaced by getCurrentVersion()

----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Tuesday, July 27, 2004 6:25 PM
Subject: Re: Time of last insert


> 
> On Jul 27, 2004, at 5:15 AM, Otis Gospodnetic wrote:
> > There is no API for that.
> 
> Yeah there is!  :)
> 
> IndexReader.lastModified()
> 
> I borrowed that from LIMO's .jsp page, by the way.
> 
> Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 

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


Re: Time of last insert

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 27, 2004, at 5:15 AM, Otis Gospodnetic wrote:
> There is no API for that.

Yeah there is!  :)

	IndexReader.lastModified()

I borrowed that from LIMO's .jsp page, by the way.

	Erik


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


Re: Time of last insert

Posted by Otis Gospodnetic <ot...@yahoo.com>.
There is no API for that.  You could look at the modification time of
index files, but this is a hack-ish approach, and is not always correct
(index files get modified for other reasons, too, such as deletion).  I
think that the index version (IndexReader class) is actually a time
stamp of last modification, but again this is not for document addition
only.

This is so easy to add to an application that uses Lucene.  Why not
just keep track of last add date in your app?

Otis

--- lingaraju <li...@infactindia.com> wrote:

> 
> Dear  All
> 
> How to know that, when(lastmodified time) last document is added to
> in index
> 
> Thanks and regards
> Raju
> 


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