lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: user index sigature
Date Wed, 26 Sep 2007 12:21:27 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message