0bd3923424a20a4ba860b0774b9991b1.asciidoc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // query-dsl/nested-query.asciidoc:206
  2. [source, php]
  3. ----
  4. $params = [
  5. 'index' => 'drivers',
  6. 'body' => [
  7. 'query' => [
  8. 'nested' => [
  9. 'path' => 'driver',
  10. 'query' => [
  11. 'nested' => [
  12. 'path' => 'driver.vehicle',
  13. 'query' => [
  14. 'bool' => [
  15. 'must' => [
  16. [
  17. 'match' => [
  18. 'driver.vehicle.make' => 'Powell Motors',
  19. ],
  20. ],
  21. [
  22. 'match' => [
  23. 'driver.vehicle.model' => 'Canyonero',
  24. ],
  25. ],
  26. ],
  27. ],
  28. ],
  29. ],
  30. ],
  31. ],
  32. ],
  33. ],
  34. ];
  35. $response = $client->search($params);
  36. ----