50 lines
960 B
Plaintext
50 lines
960 B
Plaintext
[[query-dsl-match-all-query]]
|
|
== Match all query
|
|
++++
|
|
<titleabbrev>Match all</titleabbrev>
|
|
++++
|
|
|
|
The most simple query, which matches all documents, giving them all a `_score`
|
|
of `1.0`.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
GET /_search
|
|
{
|
|
"query": {
|
|
"match_all": {}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
|
|
The `_score` can be changed with the `boost` parameter:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
GET /_search
|
|
{
|
|
"query": {
|
|
"match_all": { "boost" : 1.2 }
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
|
|
[[query-dsl-match-none-query]]
|
|
[float]
|
|
== Match None Query
|
|
|
|
This is the inverse of the `match_all` query, which matches no documents.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
GET /_search
|
|
{
|
|
"query": {
|
|
"match_none": {}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|