> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Complex Queries using Advanced Search

> Use advanced search and filtering to discover data across sources, owners, and business domains with high precision.

# Add Complex Queries using Advanced Search

In case of voluminous data, the advanced search option helps to narrow down the search results for data discovery. The query builder supports multiple conditions as well as grouped conditions to simplify search.

<Tip>
  The advanced search option is a quick and easy to use UI query builder to support complex queries for data discovery.
</Tip>

To use the advanced search for complex queries:

* Navigate to the Explore page and click on the **Advanced** option on the top right

<img src="https://mintcdn.com/openmetadata/usv6AmywY-JYXAIG/public/images/how-to-guides/discovery/adv1.png?fit=max&auto=format&n=usv6AmywY-JYXAIG&q=85&s=a338f5c7c8b638b565c63e7a6ede49fb" alt="Advanced Search" width="2943" height="1424" data-path="public/images/how-to-guides/discovery/adv1.png" />

* Using the **Syntax Editor**, select the **Field** you would like like to search by. Currently, the following fields are supported: Deleted, Owner, Tags, Tier, Service, Database, Database Schema, and Column.
* Select the required **Conditions** for your query. The following fields are supported: Equal to, Not equal to, Any in, Not in, Contains, and Does not contain. The conditions will vary based on the field selected.
* Add in the values for the **Criteria**.
* You can add multiple conditions and group the conditions together.
* Use the AND/OR conditions. Select `AND` to ensure that all the conditions are satisfied. Select `OR` to ensure that any one of the conditions is satisfied.

<img src="https://mintcdn.com/openmetadata/usv6AmywY-JYXAIG/public/images/how-to-guides/discovery/adv2.png?fit=max&auto=format&n=usv6AmywY-JYXAIG&q=85&s=739651381c2955d31890a193f8d386b3" alt="Add Complex Queries using Advanced Search" width="2943" height="1424" data-path="public/images/how-to-guides/discovery/adv2.png" />

For example, we can set up a complex query as follows:

* Group one set of conditions together by defining the `Owner`. You can add multiple conditions to define different owners and use the `OR` condition to ensure that the owner is any one among them.

<Tip>
  ### Note on Custom Properties in Elasticsearch Search

  Elasticsearch does not support searching for custom properties with the following formats:

  * **Time**
  * **DateTime**
  * Any date formats other than `yyyy-MM-dd`

  Please ensure that custom properties adhere to these constraints for compatibility with Elasticsearch search functionality.
</Tip>

<img src="https://mintcdn.com/openmetadata/usv6AmywY-JYXAIG/public/images/how-to-guides/discovery/adv3.png?fit=max&auto=format&n=usv6AmywY-JYXAIG&q=85&s=2f0b5b73ec970c5d54b99f566134a158" alt="Grouped Condition based on the Owner of the Data Assets" width="2943" height="1424" data-path="public/images/how-to-guides/discovery/adv3.png" />

* Next, you can add another set of conditions specific to the data based on the Service, Database, Schema, or Columns. **Apply** the conditions to search.

<img src="https://mintcdn.com/openmetadata/usv6AmywY-JYXAIG/public/images/how-to-guides/discovery/adv4.png?fit=max&auto=format&n=usv6AmywY-JYXAIG&q=85&s=4fc1028a50e407f0051d0712c7ef1570" alt="Advanced Search Conditions" width="2943" height="1424" data-path="public/images/how-to-guides/discovery/adv4.png" />

<img src="https://mintcdn.com/openmetadata/usv6AmywY-JYXAIG/public/images/how-to-guides/discovery/adv5.png?fit=max&auto=format&n=usv6AmywY-JYXAIG&q=85&s=b8f5261f735359c6ecd4a886a2e0b3e9" alt="Advanced Search Results" width="2943" height="1424" data-path="public/images/how-to-guides/discovery/adv5.png" />
