|
@@ -1,165 +1,186 @@
|
|
|
{
|
|
|
- "delete_by_query": {
|
|
|
- "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html",
|
|
|
- "stability": "stable",
|
|
|
- "methods": ["POST"],
|
|
|
- "url": {
|
|
|
- "paths": ["/{index}/_delete_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"
|
|
|
+ "delete_by_query":{
|
|
|
+ "documentation":{
|
|
|
+ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html",
|
|
|
+ "description":"Deletes documents matching the provided query."
|
|
|
+ },
|
|
|
+ "stability":"stable",
|
|
|
+ "url":{
|
|
|
+ "paths":[
|
|
|
+ {
|
|
|
+ "path":"/{index}/_delete_by_query",
|
|
|
+ "methods":[
|
|
|
+ "POST"
|
|
|
+ ],
|
|
|
+ "parts":{
|
|
|
+ "index":{
|
|
|
+ "type":"list",
|
|
|
+ "description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "params":{
|
|
|
+ "analyzer":{
|
|
|
+ "type":"string",
|
|
|
+ "description":"The analyzer to use for the query string"
|
|
|
},
|
|
|
- "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"
|
|
|
- },
|
|
|
- "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 delete by query 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"
|
|
|
- },
|
|
|
- "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" : "time",
|
|
|
- "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."
|
|
|
- },
|
|
|
- "max_docs": {
|
|
|
- "type" : "number",
|
|
|
- "description" : "Maximum number of documents to process (default: all documents)"
|
|
|
- },
|
|
|
- "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_excludes": {
|
|
|
- "type" : "list",
|
|
|
- "description" : "A list of fields to exclude from the returned _source field"
|
|
|
- },
|
|
|
- "_source_includes": {
|
|
|
- "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"
|
|
|
- },
|
|
|
- "version": {
|
|
|
- "type" : "boolean",
|
|
|
- "description" : "Specify whether to return document version as part of a hit"
|
|
|
- },
|
|
|
- "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."
|
|
|
- },
|
|
|
- "wait_for_active_shards": {
|
|
|
- "type" : "string",
|
|
|
- "description" : "Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
|
|
|
- },
|
|
|
- "scroll_size": {
|
|
|
- "type": "number",
|
|
|
- "defaut_value": 100,
|
|
|
- "description": "Size on the scroll request powering the delete by query"
|
|
|
- },
|
|
|
- "wait_for_completion": {
|
|
|
- "type" : "boolean",
|
|
|
- "default": true,
|
|
|
- "description" : "Should the request should block until the delete by query is complete."
|
|
|
- },
|
|
|
- "requests_per_second": {
|
|
|
- "type": "number",
|
|
|
- "default": 0,
|
|
|
- "description": "The throttle for this request in sub-requests per second. -1 means no throttle."
|
|
|
- },
|
|
|
- "slices": {
|
|
|
- "type": "number",
|
|
|
- "default": 1,
|
|
|
- "description": "The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
|
|
|
- }
|
|
|
+ "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"
|
|
|
+ },
|
|
|
+ "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 delete by query 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"
|
|
|
+ },
|
|
|
+ "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":"time",
|
|
|
+ "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."
|
|
|
+ },
|
|
|
+ "max_docs":{
|
|
|
+ "type":"number",
|
|
|
+ "description":"Maximum number of documents to process (default: all documents)"
|
|
|
+ },
|
|
|
+ "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_excludes":{
|
|
|
+ "type":"list",
|
|
|
+ "description":"A list of fields to exclude from the returned _source field"
|
|
|
+ },
|
|
|
+ "_source_includes":{
|
|
|
+ "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"
|
|
|
+ },
|
|
|
+ "version":{
|
|
|
+ "type":"boolean",
|
|
|
+ "description":"Specify whether to return document version as part of a hit"
|
|
|
+ },
|
|
|
+ "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."
|
|
|
+ },
|
|
|
+ "wait_for_active_shards":{
|
|
|
+ "type":"string",
|
|
|
+ "description":"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
|
|
|
+ },
|
|
|
+ "scroll_size":{
|
|
|
+ "type":"number",
|
|
|
+ "defaut_value":100,
|
|
|
+ "description":"Size on the scroll request powering the delete by query"
|
|
|
+ },
|
|
|
+ "wait_for_completion":{
|
|
|
+ "type":"boolean",
|
|
|
+ "default":true,
|
|
|
+ "description":"Should the request should block until the delete by query is complete."
|
|
|
+ },
|
|
|
+ "requests_per_second":{
|
|
|
+ "type":"number",
|
|
|
+ "default":0,
|
|
|
+ "description":"The throttle for this request in sub-requests per second. -1 means no throttle."
|
|
|
+ },
|
|
|
+ "slices":{
|
|
|
+ "type":"number",
|
|
|
+ "default":1,
|
|
|
+ "description":"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
|
|
|
}
|
|
|
},
|
|
|
- "body": {
|
|
|
- "description": "The search definition using the Query DSL",
|
|
|
- "required": true
|
|
|
+ "body":{
|
|
|
+ "description":"The search definition using the Query DSL",
|
|
|
+ "required":true
|
|
|
}
|
|
|
}
|
|
|
}
|