search.asciidoc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --
  2. :api: search
  3. :request: SearchRequest
  4. :response: SearchResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Rollup Search API
  8. The Rollup Search endpoint allows searching rolled-up data using the standard
  9. query DSL. The Rollup Search endpoint is needed because, internally,
  10. rolled-up documents utilize a different document structure than the original
  11. data. The Rollup Search endpoint rewrites standard query DSL into a format that
  12. matches the rollup documents, then takes the response and rewrites it back to
  13. what a client would expect given the original query.
  14. [id="{upid}-{api}-request"]
  15. ==== Request
  16. Rollup Search uses the same +{request}+ that is used by the <<{mainid}-search>>
  17. but it is mostly for aggregations you should set the `size` to 0 and add
  18. aggregations like this:
  19. ["source","java",subs="attributes,callouts,macros"]
  20. --------------------------------------------------
  21. include-tagged::{doc-tests-file}[{api}-request]
  22. --------------------------------------------------
  23. NOTE:: Rollup Search is limited in many ways because only some query elements
  24. can be translated into queries against the rollup indices. See the main
  25. {ref}/rollup-search.html[Rollup Search] documentation for more.
  26. include::../execution.asciidoc[]
  27. [id="{upid}-{api}-response"]
  28. ==== Response
  29. Rollup Search returns the same +{response}+ that is used by the
  30. <<{mainid}-search>> and everything can be accessed in exactly the same way.
  31. This will access the aggregation built by the example request above:
  32. ["source","java",subs="attributes,callouts,macros"]
  33. --------------------------------------------------
  34. include-tagged::{doc-tests-file}[{api}-response]
  35. --------------------------------------------------