elasticsearch/docs/reference/search-application/apis/delete-search-application.asciidoc
Kathleen DeRusso 0437416c33
Tech debt: Add tests to documentation for query rules, search applications (#98266)
* Add tests for query rules

* More tests

* Fix search app tests

* Fix tests

* Add teardown to tests

* Add tests for list search apps call

* Update test in get search application

* Tweak stack trace

* Make response match in test

---------

Co-authored-by: carlosdelest <carlos.delgado@elastic.co>
2023-08-09 08:01:52 -04:00

72 lines
1.4 KiB
Text

[role="xpack"]
[[delete-search-application]]
=== Delete Search Application
beta::[]
++++
<titleabbrev>Delete Search Application</titleabbrev>
++++
Removes a Search Application and its associated alias.
Indices attached to the Search Application are not removed.
[[delete-search-application-request]]
==== {api-request-title}
`DELETE _application/search_application/<name>`
[[delete-search-application-prereq]]
==== {api-prereq-title}
Requires the `manage_search_application` cluster privilege.
Also requires <<privileges-list-indices,manage privileges>> on all indices that are included in the Search Application.
[[delete-search-application-path-params]]
==== {api-path-parms-title}
`<name>`::
(Required, string)
[[delete-search-application-response-codes]]
==== {api-response-codes-title}
`400`::
The `name` was not provided.
`404` (Missing resources)::
No Search Application matching `name` could be found.
[[delete-search-application-example]]
==== {api-examples-title}
The following example deletes the Search Application named `my-app`:
////
[source,console]
----
PUT /index1
PUT _application/search_application/my-app
{
"indices": [ "index1" ],
"template": {
"script": {
"source": {
"query": {
"query_string": {
"query": "{{query_string}}"
}
}
}
}
}
}
----
// TESTSETUP
////
[source,console]
----
DELETE _application/search_application/my-app/
----