Skip to content

Commit 32d71f8

Browse files
[codegen] update to latest spec (#1211)
Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
1 parent e12891a commit 32d71f8

306 files changed

Lines changed: 11098 additions & 4317 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 248 additions & 108 deletions
Large diffs are not rendered by default.

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java

Lines changed: 251 additions & 108 deletions
Large diffs are not rendered by default.

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,48 +45,123 @@
4545
*/
4646
@JsonpDeserializable
4747
public enum CommonStatsFlag implements JsonEnum {
48+
/**
49+
* Return all statistics.
50+
*/
4851
All("_all"),
4952

53+
/**
54+
* Size of the index in byte units.
55+
*/
5056
Store("store"),
5157

58+
/**
59+
* Indexing statistics.
60+
*/
5261
Indexing("indexing"),
5362

63+
/**
64+
* Get statistics, including missing stats.
65+
*/
5466
Get("get"),
5567

68+
/**
69+
* Search statistics including suggest statistics. You can include statistics
70+
* for custom groups by adding an extra <code>groups</code> parameter (search
71+
* operations can be associated with one or more groups). The
72+
* <code>groups</code> parameter accepts a comma-separated list of group names.
73+
* Use <code>_all</code> to return statistics for all groups.
74+
*/
5675
Search("search"),
5776

77+
/**
78+
* Merge statistics.
79+
*/
5880
Merge("merge"),
5981

82+
/**
83+
* Flush statistics.
84+
*/
6085
Flush("flush"),
6186

87+
/**
88+
* Refresh statistics.
89+
*/
6290
Refresh("refresh"),
6391

92+
/**
93+
* Query cache statistics.
94+
*/
6495
QueryCache("query_cache"),
6596

97+
/**
98+
* Fielddata statistics.
99+
*/
66100
Fielddata("fielddata"),
67101

102+
/**
103+
* Number of documents and deleted docs not yet merged out. Index refreshes can
104+
* affect this statistic.
105+
*/
68106
Docs("docs"),
69107

108+
/**
109+
* Index warming statistics.
110+
*/
70111
Warmer("warmer"),
71112

113+
/**
114+
* Completion suggester statistics.
115+
*/
72116
Completion("completion"),
73117

118+
/**
119+
* Memory use of all open segments. If the
120+
* <code>include_segment_file_sizes</code> parameter is <code>true</code>, this
121+
* metric includes the aggregated disk usage of each Lucene index file.
122+
*/
74123
Segments("segments"),
75124

125+
/**
126+
* Translog statistics.
127+
*/
76128
Translog("translog"),
77129

130+
/**
131+
* Shard request cache statistics.
132+
*/
78133
RequestCache("request_cache"),
79134

135+
/**
136+
* Recovery statistics.
137+
*/
80138
Recovery("recovery"),
81139

140+
/**
141+
* Bulk operations statistics.
142+
*/
82143
Bulk("bulk"),
83144

145+
/**
146+
* Shard statistics, including the total number of shards.
147+
*/
84148
ShardStats("shard_stats"),
85149

150+
/**
151+
* Mapping statistics, including the total count and estimated overhead.
152+
*/
86153
Mappings("mappings"),
87154

155+
/**
156+
* Total number of dense vectors indexed. Index refreshes can affect this
157+
* statistic.
158+
*/
88159
DenseVector("dense_vector"),
89160

161+
/**
162+
* Total number of sparse vectors indexed. Index refreshes can affect this
163+
* statistic.
164+
*/
90165
SparseVector("sparse_vector"),
91166

92167
;

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class ElasticsearchException extends RuntimeException {
4040

4141
public ElasticsearchException(String endpointId, ErrorResponse response,
4242
@Nullable TransportHttpClient.Response httpResponse) {
43-
super("[" + endpointId + "] failed: [" + response.error().type() + "] " + response.error().reason() + (response.error().causedBy() != null ? " - " + response.error().causedBy().reason() : null));
43+
super("[" + endpointId + "] failed: [" + response.error().type() + "] " + response.error().reason());
4444
this.response = response;
4545
this.endpointId = endpointId;
4646
this.httpResponse = httpResponse;

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesOptions.java

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ public static IndicesOptions of(Function<Builder, ObjectBuilder<IndicesOptions>>
9191
}
9292

9393
/**
94-
* If false, the request returns an error if any wildcard expression, index
95-
* alias, or <code>_all</code> value targets only missing or closed indices.
96-
* This behavior applies even if the request targets other open indices. For
97-
* example, a request targeting <code>foo*,bar*</code> returns an error if an
98-
* index starts with <code>foo</code> but no index starts with <code>bar</code>.
94+
* A setting that does two separate checks on the index expression. If
95+
* <code>false</code>, the request returns an error (1) if any wildcard
96+
* expression (including <code>_all</code> and <code>*</code>) resolves to zero
97+
* matching indices or (2) if the complete set of resolved indices, aliases or
98+
* data streams is empty after all expressions are evaluated. If
99+
* <code>true</code>, index expressions that resolve to no indices are allowed
100+
* and the request returns an empty result.
99101
* <p>
100102
* API name: {@code allow_no_indices}
101103
*/
@@ -117,7 +119,10 @@ public final List<ExpandWildcard> expandWildcards() {
117119
}
118120

119121
/**
120-
* If true, missing or closed indices are not included in the response.
122+
* If <code>false</code>, the request returns an error if it targets a concrete
123+
* (non-wildcarded) index, alias, or data stream that is missing, closed, or
124+
* otherwise unavailable. If <code>true</code>, unavailable concrete targets are
125+
* silently ignored.
121126
* <p>
122127
* API name: {@code ignore_unavailable}
123128
*/
@@ -208,11 +213,13 @@ private Builder(IndicesOptions instance) {
208213

209214
}
210215
/**
211-
* If false, the request returns an error if any wildcard expression, index
212-
* alias, or <code>_all</code> value targets only missing or closed indices.
213-
* This behavior applies even if the request targets other open indices. For
214-
* example, a request targeting <code>foo*,bar*</code> returns an error if an
215-
* index starts with <code>foo</code> but no index starts with <code>bar</code>.
216+
* A setting that does two separate checks on the index expression. If
217+
* <code>false</code>, the request returns an error (1) if any wildcard
218+
* expression (including <code>_all</code> and <code>*</code>) resolves to zero
219+
* matching indices or (2) if the complete set of resolved indices, aliases or
220+
* data streams is empty after all expressions are evaluated. If
221+
* <code>true</code>, index expressions that resolve to no indices are allowed
222+
* and the request returns an empty result.
216223
* <p>
217224
* API name: {@code allow_no_indices}
218225
*/
@@ -252,7 +259,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val
252259
}
253260

254261
/**
255-
* If true, missing or closed indices are not included in the response.
262+
* If <code>false</code>, the request returns an error if it targets a concrete
263+
* (non-wildcarded) index, alias, or data stream that is missing, closed, or
264+
* otherwise unavailable. If <code>true</code>, unavailable concrete targets are
265+
* silently ignored.
256266
* <p>
257267
* API name: {@code ignore_unavailable}
258268
*/

0 commit comments

Comments
 (0)