> For the complete documentation index, see [llms.txt](https://docs.coherence.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherence.io/manual/components/coherence-tag-query.md).

# CoherenceTagQuery

{% hint style="info" %}
See also [**Queries**](/manual/optimization/areas-of-interest.md)**.**
{% endhint %}

In addition to filtering network entities by distance using a [Live Query](/manual/components/coherence-live-query.md), coherence also supports filtering them by [**Tag**](/manual/components/coherence-sync.md#tag) with **CoherenceTagQuery** component. This is useful when you have some special entities that should always be visible regardless of their position.

{% hint style="info" %}
The tag used by the **CoherenceTagQuery** component is **not** based on [Unity's tag system](https://docs.unity3d.com/Manual/Tags.html).
{% endhint %}

{% hint style="warning" %}
Having **at least one query** in the scene **is necessary** to receive any network update!
{% endhint %}

## Using Tag Queries

To create a Tag Query, right click the Hierarchy window and select *coherence > Tag Query* from the context menu.

<figure><img src="/files/S5vDkhrrtm6YIaDCWTOb" alt=""><figcaption><p>CoherenceTagQuery component</p></figcaption></figure>

All networked GameObjects with matching tags will now be visible to the Client. The Tag can be any string and can be configured in the *Advanced Settings* section of the `CoherenceSync` component.

![](/files/cGKJ2K7omBpglMt2PmQx)

Tags and Tag Queries can be updated at any time while the application is running, either from the Unity inspector or setting `CoherenceSync.CoherenceTag` and `CoherenceTagQuery.coherenceTag` in code.

Multiple tags can be combined in a single Tag Query or tag on the CoherenceSync object as multiple strings comma-delimted or delimited by "|". E.g.: "red|blue". This example will match either "red" or "blue" or both.

All tags are compared case insensitive and white space is trimmed.

{% hint style="info" %}
In the future, we plan to integrate Tag Queries with Live Queries allowing combined query restrictions, e.g., only show objects with tag "red" within an extent of 50.
{% endhint %}

### Limits

The Replication Server imposes limits on number of queries a Client can create. Read more about it in the [Replication Server](/manual/replication-server.md#maximum-query-count-per-client) section.
