FAQ
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Uwe Schindler at Oct 8, 2010 at 12:50 pm
    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: uwe@thetaphi.de
    -----Original Message-----
    From: Ivan Vasilev
    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-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Ivan Vasilev at Oct 8, 2010 at 1:00 pm
    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: uwe@thetaphi.de
    -----Original Message-----
    From: Ivan Vasilev
    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-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@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-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedOct 8, '10 at 12:35p
activeOct 8, '10 at 1:00p
posts3
users2
websitelucene.apache.org

2 users in discussion

Ivan Vasilev: 2 posts Uwe Schindler: 1 post

People

Translate

site design / logo © 2022 Grokbase