match-all-query.asciidoc 929 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. [[query-dsl-match-all-query]]
  2. == Match all query
  3. ++++
  4. <titleabbrev>Match all</titleabbrev>
  5. ++++
  6. The most simple query, which matches all documents, giving them all a `_score`
  7. of `1.0`.
  8. [source,console]
  9. --------------------------------------------------
  10. GET /_search
  11. {
  12. "query": {
  13. "match_all": {}
  14. }
  15. }
  16. --------------------------------------------------
  17. The `_score` can be changed with the `boost` parameter:
  18. [source,console]
  19. --------------------------------------------------
  20. GET /_search
  21. {
  22. "query": {
  23. "match_all": { "boost" : 1.2 }
  24. }
  25. }
  26. --------------------------------------------------
  27. [[query-dsl-match-none-query]]
  28. [discrete]
  29. == Match None Query
  30. This is the inverse of the `match_all` query, which matches no documents.
  31. [source,console]
  32. --------------------------------------------------
  33. GET /_search
  34. {
  35. "query": {
  36. "match_none": {}
  37. }
  38. }
  39. --------------------------------------------------