# Deep Search

Sometimes you want to see the matched resources and anything connected to them as well. You may want to find your instances and see their load balancers without having to specify them. Or perhaps you want to see your ECS clusters as well as the instances they are running on.

## Doing a Deep Search using `@`

Below are some example use-case you can use to define custom environments.

### Resource Type

`@type:"AWS::EC2::Instance"` will return all:

* Instances as well as connected resources
* Such as Load balancers and ECS clusters.

### Tags

`@CostCenter:dev and vpc:vpc-1234` will return all resources with the:

* Tag `CostCenter` and value `dev`
* In the VPC `vpc-1234`
* It will then also return any resources connected to them as well.

\
Any resources returned with the **deep search** operator will be returned after the search is complete and will not be matched against the query itself.

\
If you search for a specific tag with the deep search operator, it may return resources without that tag, for instance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hava.io/discover/searching/search-syntax/deep-search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
