match-all-query.asciidoc 913 B

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