Skip to content

Commit 5ae0319

Browse files
authored
Make version field names more meaningful (#35334)
* Consolidate the name of the qualified build version * Field name in response should not be redundant
1 parent 021f805 commit 5ae0319

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class DocsTestPlugin extends RestTestPlugin {
4343
* to the version being built for testing but needs to resolve to
4444
* the last released version for docs. */
4545
'\\{version\\}': Version.fromString(VersionProperties.elasticsearch).toString(),
46-
'\\{qualified_version\\}': VersionProperties.elasticsearch,
46+
'\\{version_qualified\\}': VersionProperties.elasticsearch,
4747
'\\{lucene_version\\}' : VersionProperties.lucene.replaceAll('-snapshot-\\w+$', ''),
4848
'\\{build_flavor\\}' :
4949
project.integTestCluster.distribution.startsWith('oss-') ? 'oss' : 'default',

docs/plugins/discovery-azure-classic.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ This command should give you a JSON result:
377377
"build_hash" : "f27399d",
378378
"build_date" : "2016-03-30T09:51:41.449Z",
379379
"build_snapshot" : false,
380-
"build_version" : "{qualified_version}",
380+
"qualified" : "{version_qualified}",
381381
"lucene_version" : "{lucene_version}",
382382
"minimum_wire_compatibility_version" : "1.2.3",
383383
"minimum_index_compatibility_version" : "1.2.3"

docs/reference/cat/plugins.asciidoc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ Might look like:
1414
["source","txt",subs="attributes,callouts"]
1515
------------------------------------------------------------------------------
1616
name component version description
17-
U7321H6 analysis-icu {qualified_version} The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.
18-
U7321H6 analysis-kuromoji {qualified_version} The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.
19-
U7321H6 analysis-nori {qualified_version} The Korean (nori) Analysis plugin integrates Lucene nori analysis module into elasticsearch.
20-
U7321H6 analysis-phonetic {qualified_version} The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.
21-
U7321H6 analysis-smartcn {qualified_version} Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.
22-
U7321H6 analysis-stempel {qualified_version} The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.
23-
U7321H6 analysis-ukrainian {qualified_version} The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into elasticsearch.
24-
U7321H6 discovery-azure-classic {qualified_version} The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism
25-
U7321H6 discovery-ec2 {qualified_version} The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.
26-
U7321H6 discovery-gce {qualified_version} The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.
27-
U7321H6 ingest-attachment {qualified_version} Ingest processor that uses Apache Tika to extract contents
28-
U7321H6 ingest-geoip {qualified_version} Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database
29-
U7321H6 ingest-user-agent {qualified_version} Ingest processor that extracts information from a user agent
30-
U7321H6 mapper-annotated-text {qualified_version} The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.
31-
U7321H6 mapper-murmur3 {qualified_version} The Mapper Murmur3 plugin allows to compute hashes of a field's values at index-time and to store them in the index.
32-
U7321H6 mapper-size {qualified_version} The Mapper Size plugin allows document to record their uncompressed size at index time.
33-
U7321H6 store-smb {qualified_version} The Store SMB plugin adds support for SMB stores.
34-
U7321H6 transport-nio {qualified_version} The nio transport.
17+
U7321H6 analysis-icu {version_qualified} The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.
18+
U7321H6 analysis-kuromoji {version_qualified} The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.
19+
U7321H6 analysis-nori {version_qualified} The Korean (nori) Analysis plugin integrates Lucene nori analysis module into elasticsearch.
20+
U7321H6 analysis-phonetic {version_qualified} The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.
21+
U7321H6 analysis-smartcn {version_qualified} Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.
22+
U7321H6 analysis-stempel {version_qualified} The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.
23+
U7321H6 analysis-ukrainian {version_qualified} The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into elasticsearch.
24+
U7321H6 discovery-azure-classic {version_qualified} The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism
25+
U7321H6 discovery-ec2 {version_qualified} The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.
26+
U7321H6 discovery-gce {version_qualified} The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.
27+
U7321H6 ingest-attachment {version_qualified} Ingest processor that uses Apache Tika to extract contents
28+
U7321H6 ingest-geoip {version_qualified} Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database
29+
U7321H6 ingest-user-agent {version_qualified} Ingest processor that extracts information from a user agent
30+
U7321H6 mapper-annotated-text {version_qualified} The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.
31+
U7321H6 mapper-murmur3 {version_qualified} The Mapper Murmur3 plugin allows to compute hashes of a field's values at index-time and to store them in the index.
32+
U7321H6 mapper-size {version_qualified} The Mapper Size plugin allows document to record their uncompressed size at index time.
33+
U7321H6 store-smb {version_qualified} The Store SMB plugin adds support for SMB stores.
34+
U7321H6 transport-nio {version_qualified} The nio transport.
3535
------------------------------------------------------------------------------
3636
// TESTRESPONSE[s/([.()])/\\$1/ s/U7321H6/.+/ _cat]
3737

docs/reference/setup/install/check-running.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ which should give you a response something like this:
2424
"build_hash" : "f27399d",
2525
"build_date" : "2016-03-30T09:51:41.449Z",
2626
"build_snapshot" : false,
27-
"build_version" : "{qualified_version}",
27+
"qualified" : "{version_qualified}",
2828
"lucene_version" : "{lucene_version}",
2929
"minimum_wire_compatibility_version" : "1.2.3",
3030
"minimum_index_compatibility_version" : "1.2.3"

server/src/main/java/org/elasticsearch/action/main/MainResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
113113
.field("build_hash", build.shortHash())
114114
.field("build_date", build.date())
115115
.field("build_snapshot", build.isSnapshot())
116-
.field("build_version", build.getQualifiedVersion())
116+
.field("qualified", build.getQualifiedVersion())
117117
.field("lucene_version", version.luceneVersion.toString())
118118
.field("minimum_wire_compatibility_version", version.minimumCompatibilityVersion().toString())
119119
.field("minimum_index_compatibility_version", version.minimumIndexCompatibilityVersion().toString())
@@ -141,7 +141,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
141141
(String) value.get("build_hash"),
142142
(String) value.get("build_date"),
143143
(boolean) value.get("build_snapshot"),
144-
(String) value.get("build_version")
144+
(String) value.get("qualified")
145145
);
146146
response.version = Version.fromString((String) value.get("number"));
147147
}, (parser, context) -> parser.map(), new ParseField("version"));

server/src/test/java/org/elasticsearch/action/main/MainResponseTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void testToXContent() throws IOException {
8181
+ "\"build_hash\":\"" + current.shortHash() + "\","
8282
+ "\"build_date\":\"" + current.date() + "\","
8383
+ "\"build_snapshot\":" + current.isSnapshot() + ","
84-
+ "\"build_version\":\"" + current.getQualifiedVersion() + "\","
84+
+ "\"qualified\":\"" + current.getQualifiedVersion() + "\","
8585
+ "\"lucene_version\":\"" + version.luceneVersion.toString() + "\","
8686
+ "\"minimum_wire_compatibility_version\":\"" + version.minimumCompatibilityVersion().toString() + "\","
8787
+ "\"minimum_index_compatibility_version\":\"" + version.minimumIndexCompatibilityVersion().toString() + "\"},"

0 commit comments

Comments
 (0)