IndexReader.LastModified giving invalid date? ---------------------------------------------
Key: LUCENENET-353 URL: https://issues.apache.org/jira/browse/LUCENENET-353 Project: Lucene.Net Issue Type: Bug Environment: Lucene.Net 2.9.x Reporter: Digy Priority: Minor I am opening this issue on behalf of Paulo Ferreira. "IndexReader.LastModified giving invalid date?" thread in http://mail-archives.apache.org/mod_mbox/lucene-lucene-net-user/201003.mbox/browser DIGY {quote} Hi there, I am moving an app over from using Lucene 2.0, to Lucene 2.9.1, and I've run into some issues with IndexReader.LastModified. An index which I modify with Lucene 2.0 is correctly giving me the following 'long' and formatted DateTime from IndexReader.LastModified: 634042806373153466 3/15/2010 8:10:37 PM When I use Lucene 2.9.1, I get the following: 315 01/01/0001 12:00:00 AM For what it's worth, in both cases the IndexReader.GetCurrentVersion method returns the same value: 634039174881899260 Reading the contents of the index works perfectly fine using both versions of Lucene; I can dump all the documents/fields, and perform searches, and everything else looks fine. Also, creating a _brand new_ index using Lucene 2.9.1 ALSO results IndexReader.LastModified returning an invalid date, so I don't think my problem is necessarily related to reading an old index with a newer version of Lucene 2.9.1. In this particular test, the LastModified 'long' value was 467 and the GetCurrentVersion() result was 63404283599391. Anyone have any thoughts as to what I am doing wrong? Is this expected behaviour with the latest version? Note that I am not trying to use this method to determine if the current IndexReader is up to date, but rather using it for other purposes. I've also tried using both the 'string' and 'SimpleFSDirectory' versions of the LastModified method with the same result. Thanks, -Paulo {quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.