Skip to content

Commit

Permalink
Remove type end-points from search and related APIs (#2263)
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <surajrider@gmail.com>
  • Loading branch information
dreamer-89 authored Mar 2, 2022
1 parent 897f4e7 commit 3d5aff4
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 360 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ public List<Route> routes() {
new Route(GET, "/_search/template"),
new Route(POST, "/_search/template"),
new Route(GET, "/{index}/_search/template"),
new Route(POST, "/{index}/_search/template"),
// Deprecated typed endpoints.
new Route(GET, "/{index}/{type}/_search/template"),
new Route(POST, "/{index}/{type}/_search/template")
new Route(POST, "/{index}/_search/template")
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public RestDeleteByQueryAction() {

@Override
public List<Route> routes() {
return unmodifiableList(asList(new Route(POST, "/{index}/_delete_by_query"), new Route(POST, "/{index}/{type}/_delete_by_query")));
return unmodifiableList(asList(new Route(POST, "/{index}/_delete_by_query")));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public RestUpdateByQueryAction() {

@Override
public List<Route> routes() {
return unmodifiableList(asList(new Route(POST, "/{index}/_update_by_query"), new Route(POST, "/{index}/{type}/_update_by_query")));
return unmodifiableList(asList(new Route(POST, "/{index}/_update_by_query")));
}

@Override
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,6 @@
"description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
}
}
},
{
"path" : "/{index}/{type}/_delete_by_query",
"methods": ["POST"],
"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"
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
26 changes: 4 additions & 22 deletions rest-api-spec/src/main/resources/rest-api-spec/api/msearch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,16 @@
]
},
{
"path":"/{index}/_msearch",
"methods":[
"path": "/{index}/_msearch",
"methods": [
"GET",
"POST"
],
"parts":{
"index":{
"type":"list",
"description":"A comma-separated list of index names to use as default"
}
}
},
{
"path" : "/{index}/{type}/_msearch",
"methods": ["GET", "POST"],
"parts": {
"index": {
"type" : "list",
"description" : "A comma-separated list of index names to use as default"
},
"type": {
"type" : "list",
"description" : "A comma-separated list of document types to use as default"
"type": "list",
"description": "A comma-separated list of index names to use as default"
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@
"description":"A comma-separated list of index names to use as default"
}
}
},
{
"path" : "/{index}/{type}/_msearch/template",
"methods": ["GET", "POST"],
"parts": {
"index": {
"type" : "list",
"description" : "A comma-separated list of index names to use as default"
},
"type": {
"type" : "list",
"description" : "A comma-separated list of document types to use as default"
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,6 @@
"description":"The index in which the document resides."
}
}
},
{
"path" : "/{index}/{type}/_mtermvectors",
"methods" : ["GET", "POST"],
"parts" : {
"index" : {
"type" : "string",
"description" : "The index in which the document resides."
},
"type" : {
"type" : "string",
"description" : "The type of the document."
}
},
"deprecated":{
"version" : "7.0.0",

"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
18 changes: 0 additions & 18 deletions rest-api-spec/src/main/resources/rest-api-spec/api/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@
"description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
}
}
},
{
"path" : "/{index}/{type}/_search",
"methods": ["GET", "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"
},
"type": {
"type": "list",
"description": "A comma-separated list of document types to search; leave empty to perform the operation on all types"
}
},
"deprecated" : {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@
"description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
}
}
},
{
"path" : "/{index}/{type}/_search/template",
"methods": ["GET", "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"
},
"type": {
"type" : "list",
"description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types"
}
},
"deprecated" : {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,50 +36,6 @@
"description":"The index in which the document resides."
}
}
},
{
"path" : "/{index}/{type}/{id}/_termvectors",
"methods" : ["GET", "POST"],
"parts" : {
"index" : {
"type" : "string",
"description" : "The index in which the document resides.",
"required" : true
},
"type" : {
"type" : "string",
"description" : "The type of the document.",
"required" : false
},
"id" : {
"type" : "string",
"description" : "The id of the document, when not specified a doc param should be supplied."
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
},
{
"path" : "/{index}/{type}/_termvectors",
"methods" : ["GET", "POST"],
"parts" : {
"index" : {
"type" : "string",
"description" : "The index in which the document resides.",
"required" : true
},
"type" : {
"type" : "string",
"description" : "The type of the document.",
"required" : false
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,6 @@
"description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
}
}
},
{
"path" : "/{index}/{type}/_update_by_query",
"methods": ["POST"],
"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"
}
},
"deprecated" : {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
Loading

0 comments on commit 3d5aff4

Please sign in to comment.