# Tag Search

Tag search can be powerful but a little frustrating when Hava returns no results when in fact, resources contain those tags.

### **The tag search contains three parts.**

1. The tag `name`
2. The colon <mark style="color:red;">`:`</mark> that separates the name from the value.
3. The tag `value`

### **Common reasons the tag search returns empty.**

#### **Case Sensitive**

The search string is case sensitive and expects an exact match, so `name:production` would only match something with that exact name.

#### Incorrect use of wildcard

The search supports a single wildcard character and has to be at the end of the string.

* **Correct use:** <mark style="color:green;">`name:production*`</mark>
* Incorrect use: <mark style="color:red;">`name:*-production*`</mark>

#### Incorrect tag name

Using the incorrect tag name is easily overlooked and depending on the tagging convention used, this would vary, for example:

Using a common default name such as `name:production` when in fact it is `Environment:production`

#### Special characters

The tag value contains any space or special characters, spaces or other special characters must be surrounded by "double-quotes".

* **Correct use:** <mark style="color:green;">`name:"production us-west"`</mark>
* Incorrect use: <mark style="color:red;">`name:production us-west`</mark><br>
* **Correct use:** <mark style="color:green;">`name:"production #1"`</mark>
* Incorrect use: <mark style="color:red;">`name:production #1`</mark><br>
* **Correct use:** <mark style="color:green;">`name:"production:app"`</mark>
* Incorrect use: <mark style="color:red;">`name:production:app`</mark>&#x20;

### Tips & Caveats

#### Case sensitive matches

Using or with/or without a wildcard `*`, you can account for any case-sensitive matches similar to the example below.

`(name:analytics* or Name:analytics* or name:Analytics* or Name:Analytics)`

#### Finding missing tags

A common question asked is if there is a way to identify and diagram resources with missing tags. Currently, Hava can only identify known tags. Therefore, it cannot search for any resource with no tags. The good news is it's on our roadmap.\ <br>


---

# 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/tag-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.
