MCPcopy Create free account
hub / github.com/crate/crate / indexCreated

Method indexCreated

server/src/main/java/org/elasticsearch/Version.java:350–361  ·  view source on GitHub ↗

Return the Version of Elasticsearch that has been used to create an index given its settings. @throws IllegalStateException if the given index settings doesn't contain a value for the key IndexMetadata#SETTING_VERSION_CREATED

(Settings indexSettings)

Source from the content-addressed store, hash-verified

348 * {@value IndexMetadata#SETTING_VERSION_CREATED}
349 */
350 public static Version indexCreated(Settings indexSettings) {
351 final Version indexVersion = IndexMetadata.SETTING_INDEX_VERSION_CREATED.get(indexSettings);
352 if (indexVersion == V_EMPTY) {
353 final String message = String.format(
354 Locale.ROOT,
355 "[%s] is not present in the index settings for index with UUID [%s]",
356 IndexMetadata.SETTING_INDEX_VERSION_CREATED.getKey(),
357 indexSettings.get(IndexMetadata.SETTING_INDEX_UUID));
358 throw new IllegalStateException(message);
359 }
360 return indexVersion;
361 }
362
363 public static void writeVersion(Version version, StreamOutput out) throws IOException {
364 out.writeVInt(version.internalId);

Callers 5

updateIndexMetadataMethod · 0.95
getMethod · 0.95
getMethod · 0.95
buildMethod · 0.95
parseAnalysisVersionMethod · 0.80

Calls 3

getMethod · 0.65
formatMethod · 0.65
getKeyMethod · 0.65

Tested by

no test coverage detected