Class LegacyESVersion

java.lang.Object
org.opensearch.Version
org.opensearch.LegacyESVersion
All Implemented Interfaces:
Comparable<Version>, ToXContent, ToXContentFragment

public class LegacyESVersion extends Version
The Contents of this file were originally moved from Version.

This class keeps all the supported OpenSearch predecessor versions for backward compatibility purpose.

Opensearch.internal:
  • Field Details

  • Constructor Details

    • LegacyESVersion

      protected LegacyESVersion(int id, org.apache.lucene.util.Version luceneVersion)
  • Method Details

    • isBeta

      public boolean isBeta()
      Overrides:
      isBeta in class Version
    • isAlpha

      public boolean isAlpha()
      Returns true iff this version is an alpha version Note: This has been introduced in version 5 of the OpenSearch predecessor. Previous versions will never have an alpha version.
      Overrides:
      isAlpha in class Version
    • fromString

      public static Version fromString(String version)
      Returns the version given its string representation, current version if the argument is null or empty
    • maskId

      protected int maskId(int id)
      this is used to ensure the version id for new versions of OpenSearch are always less than the predecessor versions
      Overrides:
      maskId in class Version
    • toString

      public String toString()
      Overrides:
      toString in class Version
    • computeMinIndexCompatVersion

      protected Version computeMinIndexCompatVersion()
      Overrides:
      computeMinIndexCompatVersion in class Version