forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Field delete
AlexandreToyer edited this page Sep 30, 2013
·
3 revisions
Use this API to delete a field of the schema.
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}/field/{field_name}
Method: DELETE
Header (optional returned type):
- Accept:
application/json - Accept:
application/xml
URL parameters:
- index_name (required): The name of the index.
- field_name (required): The name of the field.
The field has been deleted.
HTTP code: 200
Content (application/json):
{
"successful": true,
"info": "Deleted my_field"
}The deletion failed. The reason is provided in the content.
HTTP code: 404, 500
Field not found: my_field
Using CURL:
curl -XDELETE http://localhost:8080/services/rest/index/my_index/field/my_fieldUsing jQuery:
$.ajax({
type: "DELETE",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/field/my_field"
}).done(function (data) {
console.log(data);
});