原文地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/query-dsl-match-all-query.html, 原文档版权归 www.elastic.co 所有
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Match all queryedit
The most simple query, which matches all documents, giving them all a _score
of 1.0
.
GET /_search { "query": { "match_all": {} } }
The _score
can be changed with the boost
parameter:
GET /_search { "query": { "match_all": { "boost" : 1.2 } } }
Match None Queryedit
This is the inverse of the match_all
query, which matches no documents.
GET /_search { "query": { "match_none": {} } }