Skip to content
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

Remove type end-points from search and related APIs #2263

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 @@ -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