Skip to content

Commit 7bac8e0

Browse files
authored
Update to 7.7 rest specs (#81)
This commit updates the client to the 7.7 API specs. This required the introduction of a Slices enum type to handle the union type for slices on delete_by_query, reindex and update_by_query.
1 parent 29f1c33 commit 7bac8e0

File tree

280 files changed

+6045
-1024
lines changed

Some content is hidden

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

280 files changed

+6045
-1024
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ that is compatible with the version of Elasticsearch you're using
6161

6262
```toml
6363
[dependencies]
64-
elasticsearch = "7.6.1-alpha.1"
64+
elasticsearch = "7.7.0-alpha.1"
6565
```
6666

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

api_generator/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "api_generator"
3-
version = "7.6.1-alpha.1"
3+
version = "7.7.0-alpha.1"
44
description = "Generates source code for elasticsearch package, from the Elasticsearch REST API specs"
55
authors = ["Elastic and Contributors"]
66
edition = "2018"

api_generator/last_downloaded_version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v7.6.1
1+
7.7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"async_search.delete":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html",
5+
"description": "Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted."
6+
},
7+
"stability":"stable",
8+
"url":{
9+
"paths":[
10+
{
11+
"path":"/_async_search/{id}",
12+
"methods":[
13+
"DELETE"
14+
],
15+
"parts":{
16+
"id":{
17+
"type":"string",
18+
"description":"The async search ID"
19+
}
20+
}
21+
}
22+
]
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"async_search.get":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html",
5+
"description": "Retrieves the results of a previously submitted async search request given its ID."
6+
},
7+
"stability":"stable",
8+
"url":{
9+
"paths":[
10+
{
11+
"path":"/_async_search/{id}",
12+
"methods":[
13+
"GET"
14+
],
15+
"parts":{
16+
"id":{
17+
"type":"string",
18+
"description":"The async search ID"
19+
}
20+
}
21+
}
22+
]
23+
},
24+
"params":{
25+
"wait_for_completion_timeout":{
26+
"type":"time",
27+
"description":"Specify the time that the request should block waiting for the final response"
28+
},
29+
"keep_alive": {
30+
"type": "time",
31+
"description": "Specify the time interval in which the results (partial or final) for this search will be available"
32+
},
33+
"typed_keys":{
34+
"type":"boolean",
35+
"description":"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
36+
}
37+
}
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
{
2+
"async_search.submit":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html",
5+
"description": "Executes a search request asynchronously."
6+
},
7+
"stability":"stable",
8+
"url":{
9+
"paths":[
10+
{
11+
"path":"/_async_search",
12+
"methods":[
13+
"POST"
14+
]
15+
},
16+
{
17+
"path":"/{index}/_async_search",
18+
"methods":[
19+
"POST"
20+
],
21+
"parts":{
22+
"index":{
23+
"type":"list",
24+
"description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
25+
}
26+
}
27+
}
28+
]
29+
},
30+
"params":{
31+
"wait_for_completion_timeout":{
32+
"type":"time",
33+
"description":"Specify the time that the request should block waiting for the final response",
34+
"default": "1s"
35+
},
36+
"keep_on_completion":{
37+
"type":"boolean",
38+
"description":"Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)",
39+
"default":false
40+
},
41+
"keep_alive": {
42+
"type": "time",
43+
"description": "Update the time interval in which the results (partial or final) for this search will be available",
44+
"default": "5d"
45+
},
46+
"batched_reduce_size":{
47+
"type":"number",
48+
"description":"The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.",
49+
"default":5
50+
},
51+
"request_cache":{
52+
"type":"boolean",
53+
"description":"Specify if request cache should be used for this request or not, defaults to true"
54+
},
55+
"analyzer":{
56+
"type":"string",
57+
"description":"The analyzer to use for the query string"
58+
},
59+
"analyze_wildcard":{
60+
"type":"boolean",
61+
"description":"Specify whether wildcard and prefix queries should be analyzed (default: false)"
62+
},
63+
"default_operator":{
64+
"type":"enum",
65+
"options":[
66+
"AND",
67+
"OR"
68+
],
69+
"default":"OR",
70+
"description":"The default operator for query string query (AND or OR)"
71+
},
72+
"df":{
73+
"type":"string",
74+
"description":"The field to use as default where no field prefix is given in the query string"
75+
},
76+
"explain":{
77+
"type":"boolean",
78+
"description":"Specify whether to return detailed information about score computation as part of a hit"
79+
},
80+
"stored_fields":{
81+
"type":"list",
82+
"description":"A comma-separated list of stored fields to return as part of a hit"
83+
},
84+
"docvalue_fields":{
85+
"type":"list",
86+
"description":"A comma-separated list of fields to return as the docvalue representation of a field for each hit"
87+
},
88+
"from":{
89+
"type":"number",
90+
"description":"Starting offset (default: 0)"
91+
},
92+
"ignore_unavailable":{
93+
"type":"boolean",
94+
"description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
95+
},
96+
"ignore_throttled":{
97+
"type":"boolean",
98+
"description":"Whether specified concrete, expanded or aliased indices should be ignored when throttled"
99+
},
100+
"allow_no_indices":{
101+
"type":"boolean",
102+
"description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
103+
},
104+
"expand_wildcards":{
105+
"type":"enum",
106+
"options":[
107+
"open",
108+
"closed",
109+
"hidden",
110+
"none",
111+
"all"
112+
],
113+
"default":"open",
114+
"description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
115+
},
116+
"lenient":{
117+
"type":"boolean",
118+
"description":"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
119+
},
120+
"preference":{
121+
"type":"string",
122+
"description":"Specify the node or shard the operation should be performed on (default: random)"
123+
},
124+
"q":{
125+
"type":"string",
126+
"description":"Query in the Lucene query string syntax"
127+
},
128+
"routing":{
129+
"type":"list",
130+
"description":"A comma-separated list of specific routing values"
131+
},
132+
"search_type":{
133+
"type":"enum",
134+
"options":[
135+
"query_then_fetch",
136+
"dfs_query_then_fetch"
137+
],
138+
"description":"Search operation type"
139+
},
140+
"size":{
141+
"type":"number",
142+
"description":"Number of hits to return (default: 10)"
143+
},
144+
"sort":{
145+
"type":"list",
146+
"description":"A comma-separated list of <field>:<direction> pairs"
147+
},
148+
"_source":{
149+
"type":"list",
150+
"description":"True or false to return the _source field or not, or a list of fields to return"
151+
},
152+
"_source_excludes":{
153+
"type":"list",
154+
"description":"A list of fields to exclude from the returned _source field"
155+
},
156+
"_source_includes":{
157+
"type":"list",
158+
"description":"A list of fields to extract and return from the _source field"
159+
},
160+
"terminate_after":{
161+
"type":"number",
162+
"description":"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
163+
},
164+
"stats":{
165+
"type":"list",
166+
"description":"Specific 'tag' of the request for logging and statistical purposes"
167+
},
168+
"suggest_field":{
169+
"type":"string",
170+
"description":"Specify which field to use for suggestions"
171+
},
172+
"suggest_mode":{
173+
"type":"enum",
174+
"options":[
175+
"missing",
176+
"popular",
177+
"always"
178+
],
179+
"default":"missing",
180+
"description":"Specify suggest mode"
181+
},
182+
"suggest_size":{
183+
"type":"number",
184+
"description":"How many suggestions to return in response"
185+
},
186+
"suggest_text":{
187+
"type":"string",
188+
"description":"The source text for which the suggestions should be returned"
189+
},
190+
"timeout":{
191+
"type":"time",
192+
"description":"Explicit operation timeout"
193+
},
194+
"track_scores":{
195+
"type":"boolean",
196+
"description":"Whether to calculate and return scores even if they are not used for sorting"
197+
},
198+
"track_total_hits":{
199+
"type":"boolean",
200+
"description":"Indicate if the number of documents that match the query should be tracked"
201+
},
202+
"allow_partial_search_results":{
203+
"type":"boolean",
204+
"default":true,
205+
"description":"Indicate if an error should be returned if there is a partial search failure or timeout"
206+
},
207+
"typed_keys":{
208+
"type":"boolean",
209+
"description":"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
210+
},
211+
"version":{
212+
"type":"boolean",
213+
"description":"Specify whether to return document version as part of a hit"
214+
},
215+
"seq_no_primary_term":{
216+
"type":"boolean",
217+
"description":"Specify whether to return sequence number and primary term of the last modification of each hit"
218+
},
219+
"max_concurrent_shard_requests":{
220+
"type":"number",
221+
"description":"The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests",
222+
"default":5
223+
}
224+
},
225+
"body":{
226+
"description":"The search definition using the Query DSL"
227+
}
228+
}
229+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"autoscaling.get_autoscaling_decision":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-decision.html",
5+
"description": "Gets the current autoscaling decision based on the configured autoscaling policy, indicating whether or not autoscaling is needed."
6+
},
7+
"stability":"experimental",
8+
"url":{
9+
"paths":[
10+
{
11+
"path":"/_autoscaling/decision",
12+
"methods":[
13+
"GET"
14+
]
15+
}
16+
]
17+
}
18+
}
19+
}

api_generator/rest_specs/cat.aliases.json

+12
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@
5353
"type":"boolean",
5454
"description":"Verbose mode. Display column headers",
5555
"default":false
56+
},
57+
"expand_wildcards":{
58+
"type":"enum",
59+
"options":[
60+
"open",
61+
"closed",
62+
"hidden",
63+
"none",
64+
"all"
65+
],
66+
"default": "all",
67+
"description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
5668
}
5769
}
5870
}

api_generator/rest_specs/cat.health.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
"type":"enum",
3838
"description":"The unit in which to display time values",
3939
"options":[
40-
"d (Days)",
41-
"h (Hours)",
42-
"m (Minutes)",
43-
"s (Seconds)",
44-
"ms (Milliseconds)",
45-
"micros (Microseconds)",
46-
"nanos (Nanoseconds)"
40+
"d",
41+
"h",
42+
"m",
43+
"s",
44+
"ms",
45+
"micros",
46+
"nanos"
4747
]
4848
},
4949
"ts":{

0 commit comments

Comments
 (0)