Skip to content

Commit 2d9718b

Browse files
committed
Bump version, update to latest API spec
1 parent 1b469ae commit 2d9718b

File tree

16 files changed

+325
-18
lines changed

16 files changed

+325
-18
lines changed

.ci/run-elasticsearch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ environment=($(cat <<-END
3535
--env ELASTIC_PASSWORD=$elastic_password
3636
--env node.name=$es_node_name
3737
--env cluster.name=$cluster_name
38-
--env cluster.initial_master_nodes=$master_node_name
39-
--env discovery.seed_hosts=$master_node_name
4038
--env cluster.routing.allocation.disk.threshold_enabled=false
4139
--env bootstrap.memory_lock=true
4240
--env node.attr.testattr=test
4341
--env path.repo=/tmp
4442
--env repositories.url.allowed_urls=http://snapshot.test*
4543
--env action.destructive_requires_name=false
4644
--env ingest.geoip.downloader.enabled=false
45+
--env xpack.security.transport.ssl.enabled=false
46+
--env discovery.type=single-node
4747
END
4848
))
4949
if [[ "$TEST_SUITE" == "platinum" ]]; then

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ that is compatible with the version of Elasticsearch you're using
4444

4545
```toml
4646
[dependencies]
47-
elasticsearch = "8.3.3-alpha.1"
47+
elasticsearch = "8.4.0-alpha.1"
4848
```
4949

5050
The following _optional_ dependencies may also be useful to create requests and read responses

api_generator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "api_generator"
3-
version = "8.3.3-alpha.1"
3+
version = "8.4.0-alpha.1"
44
publish = false
55
description = "Generates source code for elasticsearch package, from the Elasticsearch REST API specs"
66
repository = "https://github.com/elastic/elasticsearch-rs"

docs/installation.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ compatible with the version of {es} you are using:
77
[source,toml]
88
----
99
[dependencies]
10-
elasticsearch = "8.3.3-alpha.1"
10+
elasticsearch = "8.4.0-alpha.1"
1111
----
1212

1313
The following _optional_ dependencies may also be useful to create requests and

elasticsearch/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "elasticsearch"
3-
version = "8.3.3-alpha.1"
3+
version = "8.4.0-alpha.1"
44
edition = "2018"
55
authors = ["Elastic and Contributors"]
66
description = "Official Elasticsearch Rust client"

elasticsearch/src/http/transport.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ impl fmt::Display for BuildError {
9595
}
9696
}
9797

98-
/// Default address to Elasticsearch running on `http://localhost:9200`
99-
pub static DEFAULT_ADDRESS: &str = "http://localhost:9200";
98+
/// Default address to Elasticsearch running on `https://localhost:9200`
99+
pub static DEFAULT_ADDRESS: &str = "https://localhost:9200";
100100

101101
lazy_static! {
102102
/// Client metadata header: service, language, transport, followed by additional information

elasticsearch/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
//!
6767
//! ```toml,no_run
6868
//! [dependencies]
69-
//! elasticsearch = "8.3.3-alpha.1"
69+
//! elasticsearch = "8.4.0-alpha.1"
7070
//! ```
7171
//! The following _optional_ dependencies may also be useful to create requests and read responses
7272
//!

elasticsearch/src/ml.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9295,6 +9295,7 @@ pub struct MlStartTrainedModelDeployment<'a, 'b, B> {
92959295
transport: &'a Transport,
92969296
parts: MlStartTrainedModelDeploymentParts<'b>,
92979297
body: Option<B>,
9298+
cache_size: Option<&'b str>,
92989299
error_trace: Option<bool>,
92999300
filter_path: Option<&'b [&'b str]>,
93009301
headers: HeaderMap,
@@ -9321,6 +9322,7 @@ where
93219322
parts,
93229323
headers,
93239324
body: None,
9325+
cache_size: None,
93249326
error_trace: None,
93259327
filter_path: None,
93269328
human: None,
@@ -9343,6 +9345,7 @@ where
93439345
transport: self.transport,
93449346
parts: self.parts,
93459347
body: Some(body.into()),
9348+
cache_size: self.cache_size,
93469349
error_trace: self.error_trace,
93479350
filter_path: self.filter_path,
93489351
headers: self.headers,
@@ -9357,6 +9360,11 @@ where
93579360
wait_for: self.wait_for,
93589361
}
93599362
}
9363+
#[doc = "A byte-size value for configuring the inference cache size. For example, 20mb."]
9364+
pub fn cache_size(mut self, cache_size: &'b str) -> Self {
9365+
self.cache_size = Some(cache_size);
9366+
self
9367+
}
93609368
#[doc = "Include the stack trace of returned errors."]
93619369
pub fn error_trace(mut self, error_trace: bool) -> Self {
93629370
self.error_trace = Some(error_trace);
@@ -9427,6 +9435,7 @@ where
94279435
#[serde_with::skip_serializing_none]
94289436
#[derive(Serialize)]
94299437
struct QueryParams<'b> {
9438+
cache_size: Option<&'b str>,
94309439
error_trace: Option<bool>,
94319440
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
94329441
filter_path: Option<&'b [&'b str]>,
@@ -9440,6 +9449,7 @@ where
94409449
wait_for: Option<&'b str>,
94419450
}
94429451
let query_params = QueryParams {
9452+
cache_size: self.cache_size,
94439453
error_trace: self.error_trace,
94449454
filter_path: self.filter_path,
94459455
human: self.human,

elasticsearch/src/params.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,15 @@ pub enum OpType {
155155
#[serde(rename = "create")]
156156
Create,
157157
}
158-
#[doc = "If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."]
158+
#[doc = "Sort order"]
159+
#[derive(Debug, PartialEq, Deserialize, Serialize, Clone, Copy)]
160+
pub enum Order {
161+
#[serde(rename = "asc")]
162+
Asc,
163+
#[serde(rename = "desc")]
164+
Desc,
165+
}
166+
#[doc = "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."]
159167
#[derive(Debug, PartialEq, Deserialize, Serialize, Clone, Copy)]
160168
pub enum Refresh {
161169
#[serde(rename = "true")]
@@ -173,13 +181,23 @@ pub enum SearchType {
173181
#[serde(rename = "dfs_query_then_fetch")]
174182
DfsQueryThenFetch,
175183
}
176-
#[doc = "The sort order for 'cpu' type (default: total)"]
184+
#[doc = "Allows setting a sort order for the result. Defaults to start_time"]
177185
#[derive(Debug, PartialEq, Deserialize, Serialize, Clone, Copy)]
178186
pub enum Sort {
179-
#[serde(rename = "cpu")]
180-
Cpu,
181-
#[serde(rename = "total")]
182-
Total,
187+
#[serde(rename = "start_time")]
188+
StartTime,
189+
#[serde(rename = "duration")]
190+
Duration,
191+
#[serde(rename = "name")]
192+
Name,
193+
#[serde(rename = "repository")]
194+
Repository,
195+
#[serde(rename = "index_count")]
196+
IndexCount,
197+
#[serde(rename = "shard_count")]
198+
ShardCount,
199+
#[serde(rename = "failed_shard_count")]
200+
FailedShardCount,
183201
}
184202
#[doc = "Specify suggest mode"]
185203
#[derive(Debug, PartialEq, Deserialize, Serialize, Clone, Copy)]

elasticsearch/src/root/mod.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2951,6 +2951,7 @@ pub struct Get<'a, 'b> {
29512951
_source_includes: Option<&'b [&'b str]>,
29522952
error_trace: Option<bool>,
29532953
filter_path: Option<&'b [&'b str]>,
2954+
force_synthetic_source: Option<bool>,
29542955
headers: HeaderMap,
29552956
human: Option<bool>,
29562957
preference: Option<&'b str>,
@@ -2977,6 +2978,7 @@ impl<'a, 'b> Get<'a, 'b> {
29772978
_source_includes: None,
29782979
error_trace: None,
29792980
filter_path: None,
2981+
force_synthetic_source: None,
29802982
human: None,
29812983
preference: None,
29822984
pretty: None,
@@ -3015,6 +3017,11 @@ impl<'a, 'b> Get<'a, 'b> {
30153017
self.filter_path = Some(filter_path);
30163018
self
30173019
}
3020+
#[doc = "Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index."]
3021+
pub fn force_synthetic_source(mut self, force_synthetic_source: bool) -> Self {
3022+
self.force_synthetic_source = Some(force_synthetic_source);
3023+
self
3024+
}
30183025
#[doc = "Adds a HTTP header"]
30193026
pub fn header(mut self, key: HeaderName, value: HeaderValue) -> Self {
30203027
self.headers.insert(key, value);
@@ -3094,6 +3101,7 @@ impl<'a, 'b> Get<'a, 'b> {
30943101
error_trace: Option<bool>,
30953102
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
30963103
filter_path: Option<&'b [&'b str]>,
3104+
force_synthetic_source: Option<bool>,
30973105
human: Option<bool>,
30983106
preference: Option<&'b str>,
30993107
pretty: Option<bool>,
@@ -3112,6 +3120,7 @@ impl<'a, 'b> Get<'a, 'b> {
31123120
_source_includes: self._source_includes,
31133121
error_trace: self.error_trace,
31143122
filter_path: self.filter_path,
3123+
force_synthetic_source: self.force_synthetic_source,
31153124
human: self.human,
31163125
preference: self.preference,
31173126
pretty: self.pretty,
@@ -4267,6 +4276,7 @@ pub struct Mget<'a, 'b, B> {
42674276
body: Option<B>,
42684277
error_trace: Option<bool>,
42694278
filter_path: Option<&'b [&'b str]>,
4279+
force_synthetic_source: Option<bool>,
42704280
headers: HeaderMap,
42714281
human: Option<bool>,
42724282
preference: Option<&'b str>,
@@ -4295,6 +4305,7 @@ where
42954305
body: None,
42964306
error_trace: None,
42974307
filter_path: None,
4308+
force_synthetic_source: None,
42984309
human: None,
42994310
preference: None,
43004311
pretty: None,
@@ -4335,6 +4346,7 @@ where
43354346
_source_includes: self._source_includes,
43364347
error_trace: self.error_trace,
43374348
filter_path: self.filter_path,
4349+
force_synthetic_source: self.force_synthetic_source,
43384350
headers: self.headers,
43394351
human: self.human,
43404352
preference: self.preference,
@@ -4357,6 +4369,11 @@ where
43574369
self.filter_path = Some(filter_path);
43584370
self
43594371
}
4372+
#[doc = "Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index."]
4373+
pub fn force_synthetic_source(mut self, force_synthetic_source: bool) -> Self {
4374+
self.force_synthetic_source = Some(force_synthetic_source);
4375+
self
4376+
}
43604377
#[doc = "Adds a HTTP header"]
43614378
pub fn header(mut self, key: HeaderName, value: HeaderValue) -> Self {
43624379
self.headers.insert(key, value);
@@ -4429,6 +4446,7 @@ where
44294446
error_trace: Option<bool>,
44304447
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
44314448
filter_path: Option<&'b [&'b str]>,
4449+
force_synthetic_source: Option<bool>,
44324450
human: Option<bool>,
44334451
preference: Option<&'b str>,
44344452
pretty: Option<bool>,
@@ -4445,6 +4463,7 @@ where
44454463
_source_includes: self._source_includes,
44464464
error_trace: self.error_trace,
44474465
filter_path: self.filter_path,
4466+
force_synthetic_source: self.force_synthetic_source,
44484467
human: self.human,
44494468
preference: self.preference,
44504469
pretty: self.pretty,
@@ -6722,6 +6741,7 @@ pub struct Search<'a, 'b, B> {
67226741
expand_wildcards: Option<&'b [ExpandWildcards]>,
67236742
explain: Option<bool>,
67246743
filter_path: Option<&'b [&'b str]>,
6744+
force_synthetic_source: Option<bool>,
67256745
from: Option<i64>,
67266746
headers: HeaderMap,
67276747
human: Option<bool>,
@@ -6785,6 +6805,7 @@ where
67856805
expand_wildcards: None,
67866806
explain: None,
67876807
filter_path: None,
6808+
force_synthetic_source: None,
67886809
from: None,
67896810
human: None,
67906811
ignore_throttled: None,
@@ -6885,6 +6906,7 @@ where
68856906
expand_wildcards: self.expand_wildcards,
68866907
explain: self.explain,
68876908
filter_path: self.filter_path,
6909+
force_synthetic_source: self.force_synthetic_source,
68886910
from: self.from,
68896911
headers: self.headers,
68906912
human: self.human,
@@ -6961,6 +6983,11 @@ where
69616983
self.filter_path = Some(filter_path);
69626984
self
69636985
}
6986+
#[doc = "Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index."]
6987+
pub fn force_synthetic_source(mut self, force_synthetic_source: bool) -> Self {
6988+
self.force_synthetic_source = Some(force_synthetic_source);
6989+
self
6990+
}
69646991
#[doc = "Starting offset (default: 0)"]
69656992
pub fn from(mut self, from: i64) -> Self {
69666993
self.from = Some(from);
@@ -7166,6 +7193,7 @@ where
71667193
explain: Option<bool>,
71677194
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
71687195
filter_path: Option<&'b [&'b str]>,
7196+
force_synthetic_source: Option<bool>,
71697197
from: Option<i64>,
71707198
human: Option<bool>,
71717199
ignore_throttled: Option<bool>,
@@ -7220,6 +7248,7 @@ where
72207248
expand_wildcards: self.expand_wildcards,
72217249
explain: self.explain,
72227250
filter_path: self.filter_path,
7251+
force_synthetic_source: self.force_synthetic_source,
72237252
from: self.from,
72247253
human: self.human,
72257254
ignore_throttled: self.ignore_throttled,

0 commit comments

Comments
 (0)