public SearchVersion major() {
        return create(distribution(), version().toBuilder()
                .setVersionCore(version().majorVersion())
                .unsetPreReleaseVersion()
                .unsetBuildMetadata()
                .build());
    }
@Test
    void major() {
        final SearchVersion searchVersion = SearchVersion.create(SearchVersion.Distribution.ELASTICSEARCH, ver("5.1.4"));
        assertThat(searchVersion.major().version().toString()).isEqualTo("5.0.0");
    }