Enum Version

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Version>

    public enum Version
    extends java.lang.Enum<Version>
    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.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean onOrAfter​(Version other)  
      static Version parseLeniently​(java.lang.String version)  
      static Version valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Version[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • LUCENE_30

        @Deprecated
        public static final Version LUCENE_30
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.0 release.
      • LUCENE_31

        @Deprecated
        public static final Version LUCENE_31
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.1 release.
      • LUCENE_32

        @Deprecated
        public static final Version LUCENE_32
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.2 release.
      • LUCENE_33

        @Deprecated
        public static final Version LUCENE_33
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.3 release.
      • LUCENE_34

        @Deprecated
        public static final Version LUCENE_34
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.4 release.
      • LUCENE_35

        @Deprecated
        public static final Version LUCENE_35
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.5 release.
      • LUCENE_36

        @Deprecated
        public static final Version LUCENE_36
        Deprecated.
        (4.0) Use latest
        Match settings and bugs in Lucene's 3.6 release.
      • LUCENE_40

        @Deprecated
        public static final Version LUCENE_40
        Deprecated.
        (4.1) Use latest
        Match settings and bugs in Lucene's 3.6 release.
      • LUCENE_41

        @Deprecated
        public static final Version LUCENE_41
        Deprecated.
        (4.2) Use latest
        Match settings and bugs in Lucene's 4.1 release.
      • LUCENE_42

        @Deprecated
        public static final Version LUCENE_42
        Deprecated.
        (4.3) Use latest
        Match settings and bugs in Lucene's 4.2 release.
      • LUCENE_43

        @Deprecated
        public static final Version LUCENE_43
        Deprecated.
        (4.4) Use latest
        Match settings and bugs in Lucene's 4.3 release.
      • LUCENE_44

        @Deprecated
        public static final Version LUCENE_44
        Deprecated.
        (4.5) Use latest
        Match settings and bugs in Lucene's 4.4 release.
      • LUCENE_45

        @Deprecated
        public static final Version LUCENE_45
        Deprecated.
        (4.6) Use latest
        Match settings and bugs in Lucene's 4.5 release.
      • LUCENE_46

        @Deprecated
        public static final Version LUCENE_46
        Deprecated.
        (4.7) Use latest
        Match settings and bugs in Lucene's 4.6 release.
      • LUCENE_47

        public static final Version LUCENE_47
        Match settings and bugs in Lucene's 4.7 release.

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

      • LUCENE_CURRENT

        @Deprecated
        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.

    • Method Detail

      • values

        public static Version[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Version c : Version.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Version valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • onOrAfter

        public boolean onOrAfter​(Version other)
      • parseLeniently

        public static Version parseLeniently​(java.lang.String version)