opensearch-docs-cn/_query-dsl/match-all.md

493 B

layout title nav_order
default Match all queries 65

Match all queries

The match_all query returns all documents. This query can be useful in testing large document sets if you need to return the entire set.

GET _search
{
  "query": {
    "match_all": {}
  }
}

{% include copy-curl.html %}

The match_all query has a match_none counterpart, which is rarely useful:

GET _search
{
  "query": {
    "match_none": {}
  }
}

{% include copy-curl.html %}