Skip to content

Commit 05c4b04

Browse files
committed
Merge pull request #2017 from elastic/2.3
Elasticsearch 2.3 new API's feature parity
2 parents 82a1370 + 39c53b1 commit 05c4b04

File tree

60 files changed

+4424
-1064
lines changed

Some content is hidden

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

60 files changed

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

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"

src/CodeGeneration/CodeGeneration.LowLevelClient/CodeGeneration.LowLevelClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<Compile Include="Overrides\Descriptors\PutIndexTemplateDescriptorOverrides.cs" />
6969
<Compile Include="Overrides\Descriptors\ScrollDescriptorOverrides.cs" />
7070
<Compile Include="Overrides\Descriptors\SearchDescriptorOverrides.cs" />
71+
<Compile Include="Overrides\Descriptors\ReindexOnServerDescriptorOverrides.cs" />
7172
<Compile Include="Overrides\Descriptors\UpdateDescriptorOverrides.cs" />
7273
<Compile Include="Overrides\Global\GlobalQueryParameters.cs" />
7374
<Compile Include="Program.cs" />

0 commit comments

Comments
 (0)