Mag, check this (in IndexReader): /** * Returns the time the index in the named directory was last modified. * Do not use this to check whether the reader is still up-to-date, use * [EMAIL PROTECTED] #isCurrent()} instead. */ public static long lastModified(String directory) throws IOException { return lastModified(new File(directory)); }
Hm, no, you seem to be looking for the creation date, not last mod date. I'm afraid that's not stored anywhere. You could get the creation date of the index directory, but that may not be accurate (e.g. you've mkdir-ed the index dir manually 14 years ago). Otis ----- Original Message ---- From: Mag Gam <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Saturday, September 9, 2006 12:13:12 PM Subject: getCurrentVersion question Hi All, I am trying to get the exact date when my index was created. I am assuming getCurrentVersion() is the right way of doing it. However, I am getting a result something like this: 1157817833085 According to the API reference, "Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index." So, to get the date of this, I should be doing something like this: date=1157817833085-1; Any thoughts? tia --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]