The following request requires the response to be displayed in pretty JSON format:
```json
GET <index_name>/_search?pretty=true
```
## Content type
To specify the type of content in the request body, use the `Content-Type` key name in the request header. Most operations support JSON, YAML, and CBOR formats.
If the client library does not accept a request body for non-POST requests, use the `source` query string parameter to pass the request body. Also, specify the `source_content_type` parameter with a supported media type such as `application/json`.
The following request sets `error_trace` to `true` so that the response returns exception-triggered errors:
```json
GET <index_name>/_search?error_trace=true
```
## Filtered responses
To reduce the response size use the `filter_path` parameter to filter the fields that are returned. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field's name. You can also exclude fields with `-`.