search-application-search.asciidoc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. [role="xpack"]
  2. [[search-application-search]]
  3. === Search Application Search
  4. preview::[]
  5. ++++
  6. <titleabbrev>Search Application Search</titleabbrev>
  7. ++++
  8. Given specified query parameters, creates an Elasticsearch query to run. Any unspecified template parameters will be
  9. assigned their default values if applicable.
  10. [[search-application-search-request]]
  11. ==== {api-request-title}
  12. `POST _application/search_application/<name>/_search`
  13. [[search-application-search-prereqs]]
  14. ==== {api-prereq-title}
  15. Requires read privileges on the backing alias of the search application.
  16. [[search-application-search-path-params]]
  17. [[search-application-search-request-body]]
  18. ==== {api-request-body-title}
  19. `params`::
  20. (Optional, map of strings to objects)
  21. Query parameters specific to this request, which will override any defaults specified in the template.
  22. [[search-application-search-response-codes]]
  23. ==== {api-response-codes-title}
  24. `404`::
  25. Search Application `<name>` does not exist.
  26. [[search-application-search-example]]
  27. ==== {api-examples-title}
  28. The following example performs a search against a search application called `my-app`:
  29. [source,console]
  30. ----
  31. POST _application/search_application/my-app/_search
  32. {
  33. "params": {
  34. "value": "my first query",
  35. "size": 10,
  36. "from": 0,
  37. "text_fields": [
  38. {
  39. "name": "title",
  40. "boost": 10
  41. },
  42. {
  43. "name": "text",
  44. "boost": 1
  45. }
  46. ]
  47. }
  48. }
  49. ----
  50. // TEST[skip:TBD]
  51. The expected results are search results from the query that was run.