org.apache.lucene.util

## Class Version

- java.lang.Object
- - org.apache.lucene.util.Parameter
  - - org.apache.lucene.util.Version

- All Implemented Interfaces:
    java.io.Serializable

      public final class Version
      extends Parameter
      implements java.io.Serializable

  Use by certain classes to match version compatibility across releases of Lucene.

  WARNING: When changing the version parameter that you supply to components in Lucene, do not simply change the version at search-time, but instead also adjust your indexing code to match, and re-index.

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Version` | `LUCENE_20` Match settings and bugs in Lucene's 2.0 release.
    `static Version` | `LUCENE_21` Match settings and bugs in Lucene's 2.1 release.
    `static Version` | `LUCENE_22` Match settings and bugs in Lucene's 2.2 release.
    `static Version` | `LUCENE_23` Match settings and bugs in Lucene's 2.3 release.
    `static Version` | `LUCENE_24` Match settings and bugs in Lucene's 2.4 release.
    `static Version` | `LUCENE_29` Match settings and bugs in Lucene's 2.9 release.
    `static Version` | `LUCENE_CURRENT` Deprecated. Use an actual version instead.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Version(java.lang.String name, int v)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `onOrAfter(Version other)`

    - ### Methods inherited from class org.apache.lucene.util.Parameter

      `readResolve, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LUCENE_CURRENT

          public static final Version LUCENE_CURRENT

      Deprecated. Use an actual version instead.

      WARNING: if you use this setting, and then upgrade to a newer release of Lucene, sizable changes may happen. If backwards compatibility is important then you should instead explicitly specify an actual version.

      If you use this constant then you may need to re-index all of your documents when upgrading Lucene, as the way text is indexed may have changed. Additionally, you may need to re-test your entire application to ensure it behaves as expected, as some defaults may have changed and may break functionality in your application.

    - #### LUCENE_20

          public static final Version LUCENE_20

      Match settings and bugs in Lucene's 2.0 release.

    - #### LUCENE_21

          public static final Version LUCENE_21

      Match settings and bugs in Lucene's 2.1 release.

    - #### LUCENE_22

          public static final Version LUCENE_22

      Match settings and bugs in Lucene's 2.2 release.

    - #### LUCENE_23

          public static final Version LUCENE_23

      Match settings and bugs in Lucene's 2.3 release.

    - #### LUCENE_24

          public static final Version LUCENE_24

      Match settings and bugs in Lucene's 2.4 release.

    - #### LUCENE_29

          public static final Version LUCENE_29

      Match settings and bugs in Lucene's 2.9 release.

      Use this to get the latest & greatest settings, bug fixes, etc, for Lucene.

  - ### Constructor Detail

    - #### Version

          public Version(java.lang.String name,
                         int v)

  - ### Method Detail

    - #### onOrAfter

          public boolean onOrAfter(Version other)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.