elasticsearch/docs/reference/search-application/apis/get-search-application.asciidoc
Kathleen DeRusso e35d9e7982
Update Search Application API docs to discuss warnings (#97188)
* Update Search Application API docs to discuss warnings

* Update docs/reference/search-application/apis/get-search-application.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Update docs/reference/search-application/apis/search-application-search.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2023-06-29 09:16:07 -04:00

77 lines
1.6 KiB
Text

[role="xpack"]
[[get-search-application]]
=== Get Search Application
beta::[]
++++
<titleabbrev>Get Search Application</titleabbrev>
++++
Retrieves information about a search application.
If the search application has an inconsistent state between its alias and configured indices, a warning header will be returned with the response.
To resolve this inconsistent state, issue an updated <<put-search-application>> command.
[[get-search-application-request]]
==== {api-request-title}
`GET _application/search_application/<name>`
[[get-search-application-prereq]]
==== {api-prereq-title}
Requires the `manage_search_application` cluster privilege.
[[get-search-application-path-params]]
==== {api-path-parms-title}
`<name>`::
(Required, string)
[[get-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.
[[get-search-application-example]]
==== {api-examples-title}
The following example gets the Search Application named `my-app`:
[source,console]
----
GET _application/search_application/my-app/
----
// TEST[skip:TBD]
A sample response:
[source,console-result]
----
{
"name": "my-app",
"indices": [ "index1", "index2" ],
"updated_at_millis": 1682105622204,
"template": {
"script": {
"source": {
"query": {
"query_string": {
"query": "{{query_string}}",
"default_field": "{{default_field}}"
}
}
},
"params": {
"query_string": "*",
"default_field": "*"
}
}
}
}
----