mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
ecbc7774ca
We already introduced the MatchNoneQueryBuilder query that does not return any documents, mainly because we needed it for internal representation of the NONE option in the IndicesQueryBuilder. However, the query was requested at least once also for the query dsl, and since we can parser it already we should document it as `match_none` query in the relevant reference docs as well.
29 lines
751 B
Plaintext
29 lines
751 B
Plaintext
[[query-dsl-match-all-query]]
|
|
== Match All Query
|
|
|
|
The most simple query, which matches all documents, giving them all a `_score`
|
|
of `1.0`.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{ "match_all": {} }
|
|
--------------------------------------------------
|
|
|
|
The `_score` can be changed with the `boost` parameter:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{ "match_all": { "boost" : 1.2 }}
|
|
--------------------------------------------------
|
|
|
|
[[query-dsl-match-none-query]]
|
|
[float]
|
|
== Match None Query
|
|
|
|
This is the inverse of the `match_all` query, which matches no documents.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{ "match_none": {} }
|
|
--------------------------------------------------
|