Would IndexReader:
/**
   * 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.
   *
   * @param directory where the index resides.
   * @return version number.
   * @throws CorruptIndexException if the index is corrupt
   * @throws IOException if there is a low-level IO error
   */
public static long getCurrentVersion(Directory directory) throws CorruptIndexException, IOException {

do what you are looking for? Also, why does it have to be in the index if you are concerned about loading the whole IndexReader? That is, if your application is versioning the application, why not just store it in the same location or something like that?

-Grant

On Sep 25, 2007, at 6:51 PM, John Wang wrote:

Hi:

Is there a way to added custom signature data to a lucene index, e.g data
version etc?

Thanks

-John

--------------------------
Grant Ingersoll
http://lucene.grantingersoll.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to