Let’s start with the simplest form of
search API, the empty search,
which returns all documents in all indices:
This is an empty request body.
Just as with a query-string search, you can search on one, many, or
indices, and one, many, or all types:
And you can use the
size parameters for pagination:
We present aggregations in depth in Aggregations, but for now,
we’re going to focus just on the query.
Instead of the cryptic query-string approach, a request body search allows us
to write queries by using the query domain-specific language, or query DSL.