forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Index delete
AlexandreToyer edited this page Sep 30, 2013
·
7 revisions
This API deletes an existing index
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}
Method: DELETE
Header (optional returned type):
- Accept:
application/json - Accept:
application/xml
URL parameters:
- index_name (required): The name of the index
The index has been deleted.
HTTP code: 200
Content (application/json):
{
"result": {
"@successful": "true",
"info": "Index deleted: my_index"
}
}The index creation failed. The reason is provided in the content.
HTTP code: 500
Content (text/plain):
Index "my_index" not found. The index directory does not exist
Using CURL:
curl -XDELETE http://localhost:8080/services/rest/index/my_indexUsing jQuery:
$.ajax({
type: "DELETE",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index"
}).done(function (data) {
console.log(data);
});