Skip to content

Elasticsearch 2.3 new API's feature parity #2017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"parts": {
"repository": {
"type" : "list",
"required" : true,
"required": true,
"description": "Name of repository from which to fetch the snapshot information"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
"type" : "string",
"description" : "The name of the tokenizer to use for the analysis"
},
"detail": {
"explain": {
"type" : "boolean",
"description" : "With `true`, outputs more advanced details. (default: false)"
},
"attributes": {
"type" : "list",
"description" : "A comma-separated list of token attributes to output, this parameter works only with `detail=true`"
"description" : "A comma-separated list of token attributes to output, this parameter works only with `explain=true`"
},
"format": {
"type": "enum",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"indices.optimize": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-optimize.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-optimize.html",
"methods": ["POST", "GET"],
"url": {
"path": "/_optimize",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"reindex": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html",
"methods": ["POST"],
"url": {
"path": "/_reindex",
"paths": ["/_reindex"],
"parts": {},
"params": {
"refresh": {
"type" : "boolean",
"description" : "Should the effected indexes be refreshed?"
},
"timeout": {
"type" : "time",
"default": "1m",
"description" : "Time each individual bulk request should wait for shards that are unavailable."
},
"consistency": {
"type" : "enum",
"options" : ["one", "quorum", "all"],
"description" : "Explicit write consistency setting for the operation"
},
"wait_for_completion": {
"type" : "boolean",
"default": false,
"description" : "Should the request should block until the reindex is complete."
}
}
},
"body": {
"description": "The search definition using the Query DSL and the prototype for the index request.",
"required": true
}
}
}
1,008 changes: 553 additions & 455 deletions src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/root.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"search_exists": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-exists.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-exists.html",
"methods": ["POST", "GET"],
"url": {
"path": "/_search/exists",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"tasks.cancel": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-cancel.html",
"methods": ["POST"],
"url": {
"path": "/_tasks",
"paths": ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"],
"parts": {
"task_id": {
"type": "string",
"description": "Cancel the task with specified id"
}
},
"params": {
"node_id": {
"type": "list",
"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"
},
"actions": {
"type": "list",
"description": "A comma-separated list of actions that should be cancelled. Leave empty to cancel all."
},
"parent_node": {
"type": "string",
"description": "Cancel tasks with specified parent node."
},
"parent_task": {
"type" : "string",
"description" : "Cancel tasks with specified parent task id. Set to -1 to cancel all."
}
}
},
"body": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"tasks.list": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-list.html",
"methods": ["GET"],
"url": {
"path": "/_tasks",
"paths": ["/_tasks", "/_tasks/{task_id}"],
"parts": {
"task_id": {
"type": "string",
"description": "Return the task with specified id"
}
},
"params": {
"node_id": {
"type": "list",
"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"
},
"actions": {
"type": "list",
"description": "A comma-separated list of actions that should be returned. Leave empty to return all."
},
"detailed": {
"type": "boolean",
"description": "Return detailed task information (default: false)"
},
"parent_node": {
"type": "string",
"description": "Return tasks with specified parent node."
},
"parent_task": {
"type" : "string",
"description" : "Return tasks with specified parent task id. Set to -1 to return all."
},
"wait_for_completion": {
"type": "boolean",
"description": "Wait for the matching tasks to complete (default: false)"
}
}
},
"body": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
{
"update_by_query": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html",
"methods": ["POST"],
"url": {
"path": "/{index}/_update_by_query",
"paths": ["/{index}/_update_by_query", "/{index}/{type}/_update_by_query"],
"comment": "most things below this are just copied from search.json",
"parts": {
"index": {
"required" : true,
"type" : "list",
"description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
},
"type": {
"type" : "list",
"description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types"
}
},
"params": {
"analyzer": {
"type" : "string",
"description" : "The analyzer to use for the query string"
},
"analyze_wildcard": {
"type" : "boolean",
"description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
},
"default_operator": {
"type" : "enum",
"options" : ["AND","OR"],
"default" : "OR",
"description" : "The default operator for query string query (AND or OR)"
},
"df": {
"type" : "string",
"description" : "The field to use as default where no field prefix is given in the query string"
},
"explain": {
"type" : "boolean",
"description" : "Specify whether to return detailed information about score computation as part of a hit"
},
"fields": {
"type" : "list",
"description" : "A comma-separated list of fields to return as part of a hit"
},
"fielddata_fields": {
"type" : "list",
"description" : "A comma-separated list of fields to return as the field data representation of a field for each hit"
},
"from": {
"type" : "number",
"description" : "Starting offset (default: 0)"
},
"ignore_unavailable": {
"type" : "boolean",
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
},
"allow_no_indices": {
"type" : "boolean",
"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)"
},
"conflicts": {
"note": "This is not copied from search",
"type" : "enum",
"options": ["abort", "proceed"],
"default": "abort",
"description" : "What to do when the reindex hits version conflicts?"
},
"expand_wildcards": {
"type" : "enum",
"options" : ["open","closed","none","all"],
"default" : "open",
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
},
"lenient": {
"type" : "boolean",
"description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
},
"lowercase_expanded_terms": {
"type" : "boolean",
"description" : "Specify whether query terms should be lowercased"
},
"preference": {
"type" : "string",
"description" : "Specify the node or shard the operation should be performed on (default: random)"
},
"q": {
"type" : "string",
"description" : "Query in the Lucene query string syntax"
},
"routing": {
"type" : "list",
"description" : "A comma-separated list of specific routing values"
},
"scroll": {
"type" : "duration",
"description" : "Specify how long a consistent view of the index should be maintained for scrolled search"
},
"search_type": {
"type" : "enum",
"options" : ["query_then_fetch", "dfs_query_then_fetch"],
"description" : "Search operation type"
},
"search_timeout": {
"type" : "time",
"description" : "Explicit timeout for each search request. Defaults to no timeout."
},
"size": {
"type" : "number",
"description" : "Number of hits to return (default: 10)"
},
"sort": {
"type" : "list",
"description" : "A comma-separated list of <field>:<direction> pairs"
},
"_source": {
"type" : "list",
"description" : "True or false to return the _source field or not, or a list of fields to return"
},
"_source_exclude": {
"type" : "list",
"description" : "A list of fields to exclude from the returned _source field"
},
"_source_include": {
"type" : "list",
"description" : "A list of fields to extract and return from the _source field"
},
"terminate_after": {
"type" : "number",
"description" : "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
},
"stats": {
"type" : "list",
"description" : "Specific 'tag' of the request for logging and statistical purposes"
},
"suggest_field": {
"type" : "string",
"description" : "Specify which field to use for suggestions"
},
"suggest_mode": {
"type" : "enum",
"options" : ["missing", "popular", "always"],
"default" : "missing",
"description" : "Specify suggest mode"
},
"suggest_size": {
"type" : "number",
"description" : "How many suggestions to return in response"
},
"suggest_text": {
"type" : "text",
"description" : "The source text for which the suggestions should be returned"
},
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
},
"track_scores": {
"type" : "boolean",
"description": "Whether to calculate and return scores even if they are not used for sorting"
},
"version": {
"type" : "boolean",
"description" : "Specify whether to return document version as part of a hit"
},
"version_type": {
"type" : "boolean",
"description" : "Should the document increment the version number (internal) on hit or not (reindex)"
},
"request_cache": {
"type" : "boolean",
"description" : "Specify if request cache should be used for this request or not, defaults to index level setting"
},
"refresh": {
"type" : "boolean",
"description" : "Should the effected indexes be refreshed?"
},
"timeout": {
"type" : "time",
"default": "1m",
"description" : "Time each individual bulk request should wait for shards that are unavailable."
},
"consistency": {
"type" : "enum",
"options" : ["one", "quorum", "all"],
"description" : "Explicit write consistency setting for the operation"
},
"scroll_size": {
"type": "integer",
"defaut_value": 100,
"description": "Size on the scroll request powering the update_by_query"
},
"wait_for_completion": {
"type" : "boolean",
"default": false,
"description" : "Should the request should block until the reindex is complete."
}
}
},
"body": {
"description": "The search definition using the Query DSL"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ApiGenerator
private static string ViewFolder;
private static string ApiEndpointsFolder;
private static readonly RazorMachine RazorHelper;
private static readonly string Version = "2.2";
private static readonly string Version = "2.3";
private static readonly List<string> ApiListings = new List<string>
{
"https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/api"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<Compile Include="Overrides\Descriptors\PutIndexTemplateDescriptorOverrides.cs" />
<Compile Include="Overrides\Descriptors\ScrollDescriptorOverrides.cs" />
<Compile Include="Overrides\Descriptors\SearchDescriptorOverrides.cs" />
<Compile Include="Overrides\Descriptors\ReindexOnServerDescriptorOverrides.cs" />
<Compile Include="Overrides\Descriptors\UpdateDescriptorOverrides.cs" />
<Compile Include="Overrides\Global\GlobalQueryParameters.cs" />
<Compile Include="Program.cs" />
Expand Down
Loading