put-search-application.asciidoc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. [role="xpack"]
  2. [[put-search-application]]
  3. === Put Search Application
  4. beta::[]
  5. ++++
  6. <titleabbrev>Put Search Application</titleabbrev>
  7. ++++
  8. Creates or updates a Search Application.
  9. [[put-search-application-request]]
  10. ==== {api-request-title}
  11. `PUT _application/search_application/<name>`
  12. [[put-search-application-prereqs]]
  13. ==== {api-prereq-title}
  14. Requires the `manage_search_application` cluster privilege.
  15. Also requires <<privileges-list-indices,manage privileges>> on all indices that are added to the Search Application.
  16. [[put-search-application-path-params]]
  17. ==== {api-path-parms-title}
  18. `create`::
  19. (Optional, Boolean) If `true`, this request cannot replace or update existing Search Applications.
  20. Defaults to `false`.
  21. [[put-search-application-response-codes]]
  22. ==== {api-response-codes-title}
  23. `404`::
  24. Search Application `<name>` does not exist.
  25. `409`::
  26. Search Application `<name>` exists and `create` is `true`.
  27. [[put-search-application-example]]
  28. ==== {api-examples-title}
  29. The following example creates a new Search Application called `my-app`:
  30. [source,console]
  31. ----
  32. PUT _application/search_application/my-app?create
  33. {
  34. "indices": [ "index1", "index2" ],
  35. "analytics_collection_name": "my-analytics-collection"
  36. }
  37. ----
  38. // TEST[skip:TBD]
  39. The following example creates or updates an existing Search Application called `my_app`:
  40. [source,console]
  41. ----
  42. PUT _application/search_application/my-app
  43. {
  44. "indices": [ "index1", "index2", "index3" ],
  45. "analytics_collection_name": "my-analytics-collection"
  46. }
  47. ----
  48. // TEST[skip:TBD]