Skip to content

Commit f0a71c4

Browse files
committed
CodeGeneration commit for Elasticsearch 2.3
1 parent c3efdb8 commit f0a71c4

18 files changed

+3299
-990
lines changed

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/cat.snapshots.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"parts": {
99
"repository": {
1010
"type" : "list",
11-
"required" : true,
11+
"required": true,
1212
"description": "Name of repository from which to fetch the snapshot information"
1313
}
1414
},

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/indices.analyze.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
"type" : "string",
4545
"description" : "The name of the tokenizer to use for the analysis"
4646
},
47-
"detail": {
47+
"explain": {
4848
"type" : "boolean",
4949
"description" : "With `true`, outputs more advanced details. (default: false)"
5050
},
5151
"attributes": {
5252
"type" : "list",
53-
"description" : "A comma-separated list of token attributes to output, this parameter works only with `detail=true`"
53+
"description" : "A comma-separated list of token attributes to output, this parameter works only with `explain=true`"
5454
},
5555
"format": {
5656
"type": "enum",

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/indices.optimize.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"indices.optimize": {
3-
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-optimize.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-optimize.html",
44
"methods": ["POST", "GET"],
55
"url": {
66
"path": "/_optimize",
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"reindex": {
3+
"documentation": "https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html",
4+
"methods": ["POST"],
5+
"url": {
6+
"path": "/_reindex",
7+
"paths": ["/_reindex"],
8+
"parts": {},
9+
"params": {
10+
"refresh": {
11+
"type" : "boolean",
12+
"description" : "Should the effected indexes be refreshed?"
13+
},
14+
"timeout": {
15+
"type" : "time",
16+
"default": "1m",
17+
"description" : "Time each individual bulk request should wait for shards that are unavailable."
18+
},
19+
"consistency": {
20+
"type" : "enum",
21+
"options" : ["one", "quorum", "all"],
22+
"description" : "Explicit write consistency setting for the operation"
23+
},
24+
"wait_for_completion": {
25+
"type" : "boolean",
26+
"default": false,
27+
"description" : "Should the request should block until the reindex is complete."
28+
}
29+
}
30+
},
31+
"body": {
32+
"description": "The search definition using the Query DSL and the prototype for the index request.",
33+
"required": true
34+
}
35+
}
36+
}

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/root.html

Lines changed: 1210 additions & 572 deletions
Large diffs are not rendered by default.

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/search_exists.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"search_exists": {
3-
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-exists.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-exists.html",
44
"methods": ["POST", "GET"],
55
"url": {
66
"path": "/_search/exists",
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"tasks.cancel": {
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-cancel.html",
4+
"methods": ["POST"],
5+
"url": {
6+
"path": "/_tasks",
7+
"paths": ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"],
8+
"parts": {
9+
"task_id": {
10+
"type": "number",
11+
"description": "Cancel the task with specified id"
12+
}
13+
},
14+
"params": {
15+
"node_id": {
16+
"type": "list",
17+
"description": "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
18+
},
19+
"actions": {
20+
"type": "list",
21+
"description": "A comma-separated list of actions that should be cancelled. Leave empty to cancel all."
22+
},
23+
"parent_node": {
24+
"type": "string",
25+
"description": "Cancel tasks with specified parent node."
26+
},
27+
"parent_task": {
28+
"type" : "number",
29+
"description" : "Cancel tasks with specified parent task id. Set to -1 to cancel all."
30+
}
31+
}
32+
},
33+
"body": null
34+
}
35+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"tasks.list": {
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-list.html",
4+
"methods": ["GET"],
5+
"url": {
6+
"path": "/_tasks",
7+
"paths": ["/_tasks", "/_tasks/{task_id}"],
8+
"parts": {
9+
"task_id": {
10+
"type": "number",
11+
"description": "Return the task with specified id"
12+
}
13+
},
14+
"params": {
15+
"node_id": {
16+
"type": "list",
17+
"description": "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
18+
},
19+
"actions": {
20+
"type": "list",
21+
"description": "A comma-separated list of actions that should be returned. Leave empty to return all."
22+
},
23+
"detailed": {
24+
"type": "boolean",
25+
"description": "Return detailed task information (default: false)"
26+
},
27+
"parent_node": {
28+
"type": "string",
29+
"description": "Return tasks with specified parent node."
30+
},
31+
"parent_task": {
32+
"type" : "number",
33+
"description" : "Return tasks with specified parent task id. Set to -1 to return all."
34+
},
35+
"wait_for_completion": {
36+
"type": "boolean",
37+
"description": "Wait for the matching tasks to complete (default: false)"
38+
}
39+
}
40+
},
41+
"body": null
42+
}
43+
}
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
{
2+
"update_by_query": {
3+
"documentation": "https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html",
4+
"methods": ["POST"],
5+
"url": {
6+
"path": "/{index}/_update_by_query",
7+
"paths": ["/{index}/_update_by_query", "/{index}/{type}/_update_by_query"],
8+
"comment": "most things below this are just copied from search.json",
9+
"parts": {
10+
"index": {
11+
"type" : "list",
12+
"description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
13+
},
14+
"type": {
15+
"type" : "list",
16+
"description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types"
17+
}
18+
},
19+
"params": {
20+
"analyzer": {
21+
"type" : "string",
22+
"description" : "The analyzer to use for the query string"
23+
},
24+
"analyze_wildcard": {
25+
"type" : "boolean",
26+
"description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
27+
},
28+
"default_operator": {
29+
"type" : "enum",
30+
"options" : ["AND","OR"],
31+
"default" : "OR",
32+
"description" : "The default operator for query string query (AND or OR)"
33+
},
34+
"df": {
35+
"type" : "string",
36+
"description" : "The field to use as default where no field prefix is given in the query string"
37+
},
38+
"explain": {
39+
"type" : "boolean",
40+
"description" : "Specify whether to return detailed information about score computation as part of a hit"
41+
},
42+
"fields": {
43+
"type" : "list",
44+
"description" : "A comma-separated list of fields to return as part of a hit"
45+
},
46+
"fielddata_fields": {
47+
"type" : "list",
48+
"description" : "A comma-separated list of fields to return as the field data representation of a field for each hit"
49+
},
50+
"from": {
51+
"type" : "number",
52+
"description" : "Starting offset (default: 0)"
53+
},
54+
"ignore_unavailable": {
55+
"type" : "boolean",
56+
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
57+
},
58+
"allow_no_indices": {
59+
"type" : "boolean",
60+
"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)"
61+
},
62+
"conflicts": {
63+
"note": "This is not copied from search",
64+
"type" : "enum",
65+
"options": ["abort", "proceed"],
66+
"default": "abort",
67+
"description" : "What to do when the reindex hits version conflicts?"
68+
},
69+
"expand_wildcards": {
70+
"type" : "enum",
71+
"options" : ["open","closed","none","all"],
72+
"default" : "open",
73+
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
74+
},
75+
"lenient": {
76+
"type" : "boolean",
77+
"description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
78+
},
79+
"lowercase_expanded_terms": {
80+
"type" : "boolean",
81+
"description" : "Specify whether query terms should be lowercased"
82+
},
83+
"preference": {
84+
"type" : "string",
85+
"description" : "Specify the node or shard the operation should be performed on (default: random)"
86+
},
87+
"q": {
88+
"type" : "string",
89+
"description" : "Query in the Lucene query string syntax"
90+
},
91+
"routing": {
92+
"type" : "list",
93+
"description" : "A comma-separated list of specific routing values"
94+
},
95+
"scroll": {
96+
"type" : "duration",
97+
"description" : "Specify how long a consistent view of the index should be maintained for scrolled search"
98+
},
99+
"search_type": {
100+
"type" : "enum",
101+
"options" : ["query_then_fetch", "dfs_query_then_fetch"],
102+
"description" : "Search operation type"
103+
},
104+
"search_timeout": {
105+
"type" : "time",
106+
"description" : "Explicit timeout for each search request. Defaults to no timeout."
107+
},
108+
"size": {
109+
"type" : "number",
110+
"description" : "Number of hits to return (default: 10)"
111+
},
112+
"sort": {
113+
"type" : "list",
114+
"description" : "A comma-separated list of <field>:<direction> pairs"
115+
},
116+
"_source": {
117+
"type" : "list",
118+
"description" : "True or false to return the _source field or not, or a list of fields to return"
119+
},
120+
"_source_exclude": {
121+
"type" : "list",
122+
"description" : "A list of fields to exclude from the returned _source field"
123+
},
124+
"_source_include": {
125+
"type" : "list",
126+
"description" : "A list of fields to extract and return from the _source field"
127+
},
128+
"terminate_after": {
129+
"type" : "number",
130+
"description" : "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
131+
},
132+
"stats": {
133+
"type" : "list",
134+
"description" : "Specific 'tag' of the request for logging and statistical purposes"
135+
},
136+
"suggest_field": {
137+
"type" : "string",
138+
"description" : "Specify which field to use for suggestions"
139+
},
140+
"suggest_mode": {
141+
"type" : "enum",
142+
"options" : ["missing", "popular", "always"],
143+
"default" : "missing",
144+
"description" : "Specify suggest mode"
145+
},
146+
"suggest_size": {
147+
"type" : "number",
148+
"description" : "How many suggestions to return in response"
149+
},
150+
"suggest_text": {
151+
"type" : "text",
152+
"description" : "The source text for which the suggestions should be returned"
153+
},
154+
"timeout": {
155+
"type" : "time",
156+
"description" : "Explicit operation timeout"
157+
},
158+
"track_scores": {
159+
"type" : "boolean",
160+
"description": "Whether to calculate and return scores even if they are not used for sorting"
161+
},
162+
"version": {
163+
"type" : "boolean",
164+
"description" : "Specify whether to return document version as part of a hit"
165+
},
166+
"version_type": {
167+
"type" : "boolean",
168+
"description" : "Should the document increment the version number (internal) on hit or not (reindex)"
169+
},
170+
"request_cache": {
171+
"type" : "boolean",
172+
"description" : "Specify if request cache should be used for this request or not, defaults to index level setting"
173+
},
174+
"refresh": {
175+
"type" : "boolean",
176+
"description" : "Should the effected indexes be refreshed?"
177+
},
178+
"timeout": {
179+
"type" : "time",
180+
"default": "1m",
181+
"description" : "Time each individual bulk request should wait for shards that are unavailable."
182+
},
183+
"consistency": {
184+
"type" : "enum",
185+
"options" : ["one", "quorum", "all"],
186+
"description" : "Explicit write consistency setting for the operation"
187+
},
188+
"scroll_size": {
189+
"type": "integer",
190+
"defaut_value": 100,
191+
"description": "Size on the scroll request powering the update_by_query"
192+
},
193+
"wait_for_completion": {
194+
"type" : "boolean",
195+
"default": false,
196+
"description" : "Should the request should block until the reindex is complete."
197+
}
198+
}
199+
},
200+
"body": {
201+
"description": "The search definition using the Query DSL"
202+
}
203+
}
204+
}

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ApiGenerator
2424
private static string ViewFolder;
2525
private static string ApiEndpointsFolder;
2626
private static readonly RazorMachine RazorHelper;
27-
private static readonly string Version = "2.2";
27+
private static readonly string Version = "2.3";
2828
private static readonly List<string> ApiListings = new List<string>
2929
{
3030
"https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/api"

0 commit comments

Comments
 (0)