match-all-query.asciidoc 960 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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,js]
  9. --------------------------------------------------
  10. GET /_search
  11. {
  12. "query": {
  13. "match_all": {}
  14. }
  15. }
  16. --------------------------------------------------
  17. // CONSOLE
  18. The `_score` can be changed with the `boost` parameter:
  19. [source,js]
  20. --------------------------------------------------
  21. GET /_search
  22. {
  23. "query": {
  24. "match_all": { "boost" : 1.2 }
  25. }
  26. }
  27. --------------------------------------------------
  28. // CONSOLE
  29. [[query-dsl-match-none-query]]
  30. [float]
  31. == Match None Query
  32. This is the inverse of the `match_all` query, which matches no documents.
  33. [source,js]
  34. --------------------------------------------------
  35. GET /_search
  36. {
  37. "query": {
  38. "match_none": {}
  39. }
  40. }
  41. --------------------------------------------------
  42. // CONSOLE