Idea is that you could debug the request rather fast without looking into log or debuging code.
Something like that:
```php
$type->search($query);

$request = $type->getIndex()->getClient()->getLastRequest();
var_dump((string) $request);
```