lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <scott.ga...@eTapestry.com>
Subject IndexReader.lastModified() not correct
Date Wed, 07 Aug 2002 14:27:24 GMT
The current implementation of IndexReader.lastModified() does not return the
results I am expecting.  Here is the implementation:

  /** Returns the time the index in the named directory was last modified.
*/
  public static long lastModified(File directory) throws IOException {
    return FSDirectory.fileModified(directory, "segments");
  }

The problem is that the "segments" file is apparently not updated when just
doing a delete from an index.  This is causing me problems because I am
attempting to rely on on the lastModified() command for IndexSearcher
caching.  The only solution that I have thought of so far (without changing
other parts of Lucene) is to make the lastModified() command look at all the
files in the last segment for the last modified date.

Thoughts?

Thanks,
Scott

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message