@Override
    public SearchVersion convertFrom(String value) {
        try {
            // only major version - we know it's elasticsearch
            final int majorVersion = Integer.parseInt(value);
            return SearchVersion.elasticsearch(majorVersion, 0, 0);
        } catch (NumberFormatException nfe) {
            // It's probably a distribution:version format
            // caution, this format assumes full version X.Y.Z, not just major number
            return SearchVersion.decode(value);
        }
    }
@Test
    void convertEncodedValue() {
        final SearchVersion version = converter.convertFrom("OPENSEARCH:1.2.0");
        assertThat(version).isEqualTo(SearchVersion.create(SearchVersion.Distribution.OPENSEARCH, Version.parse("1.2.0")));
    }