OK 10x Uwe :)

On 08.10.2010 г. 15:50, Uwe Schindler wrote:
There is no easy way to get a global Lucene index version, as each segment
has its own versions and in each segment, even each file type has its own
version. There is an issue open, to also store the Lucene version in the
segments file itself after each update (so get the "newest" file type across
the whole index).

About 3.0: The file format in 3.0 didn't change, it is the same as in 2.9.
Only for stored fields, the version number was increased to easily detect a
segment, that has no compressed fields anymore and does not need to be
re-merged to remove compression. From user code, this version number is not
easily detectable.

An easy way is t use the CheckIndex tool, that will print all version
information in the diagnostics data for each segment. Please note, for 3.0
indexes it still prints 2.9 on the to-level index information (see above).

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de

-----Original Message-----
From: Ivan Vasilev [mailto:ivasi...@sirma.bg]
Sent: Friday, October 08, 2010 8:35 AM
To: LUCENE MAIL LIST
Subject: detect Lucene version

   Hi Guys,

Is there way to detect org.apache.lucene.util.Version of an index having
IndexReader or just FSDirectory?
I know I can open segments file and read the proper bytes according to
rules of
creating it but is there more smart way to do this without using
RandomAccessFile or something like this.
Actually I need just to know if index is pre Lucene 3_0 or 3_0 (or later).

Thanks,
Ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org


__________ NOD32 3990 (20090406) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to