> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/guides/introduction/the-output-module-query-language/filtering-operators/filtering-in-hierarchy.md).

# Filtering in Hierarchy

When the `EQUALS/NOT_EQUALS` and `IN/NOT_IN` operators are used in conjunction with an `Id` property of an asset, a `RelationType` or a `Community` can take an additional `descendants: true` parameter. When true, the query engine will force an `IN` or `NOT_IN` filter and add all `Id`s from the child assets, relation types or communities. This allows selecting the following assets.

* All assets under a community, including the subcommunities.
* All assets that are of type "X" or one of its subtypes.
* All assets with all subtypes that implement trait "X".


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://developer.collibra.com/api/guides/introduction/the-output-module-query-language/filtering-operators/filtering-in-hierarchy.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.
