
## Limit search result details

URL: https://docs.atlan.com/product/capabilities/build-apps/sdks/python/search/references/limit

> Control search result details programmatically using the Atlan Python SDK (pyatlan) to include specific asset properties and relationships.

# Limit search result details

By default, each search result will contain very limited details—typically only the unique identities (GUID and `qualifiedName`) and `name` of each asset. This is intentional, to prevent retrieving more information than you need, as every piece of information you retrieve will add a little bit of time to the overall runtime of your request.

You can request additional details on each search result, though, to make sure the search gives you back exactly the information you require:

## Include asset properties

You can specify any properties of an asset you want to include in each search result, including relationships:

### Java

```java showLineNumbers title="Include asset properties"
client.assets.select() // (1)
 .includeOnResults(Table.CREATE_TIME) // (2)
 .includeOnResults(Table.UPDATE_TIME)
 .includeOnResults(Table.COLUMNS)
 .stream() // (3)
 ...
```

1. Start building a FluentSearch query (in this example from a client, using its 'assets' member's `select()` method).
2. Chain as many `includeOnResults` calls as you like. Each method call should include a searchable Atlan field you want to include on each search result. (And this can include relationship attributes as well, such as the columns in a table in this example.)
3. You can then run the search as you like (in this example, streaming the results directly).

### Python

```python showLineNumbers title="Include asset properties"
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Table
from pyatlan.model.fluent_search import FluentSearch

client = AtlanClient()
request = (
 FluentSearch.select() # (1)
 .include_on_results(Table.CREATE_TIME) # (2)
 .include_on_results(Table.UPDATE_TIME)
 .include_on_results(Table.COLUMNS)
).to_request() # (3)
results = client.asset.search(criteria=request)
```

1. Start building a FluentSearch query (in this example using its `select()` method directly).
2. Chain as many `include_on_results` calls as you like. Each method call should include a searchable Atlan field you want to include on each search result. (And this can include relationship attributes as well, such as the columns in a table in this example.)
3. You can then run the search as you like (in this example, converting to a request and running the search using the request).

### Kotlin

```kotlin showLineNumbers title="Include asset properties"
client.assets.select() // (1)
 .includeOnResults(Table.CREATE_TIME) // (2)
 .includeOnResults(Table.UPDATE_TIME)
 .includeOnResults(Table.COLUMNS)
 .stream() // (3)
 ...
```

1. Start building a FluentSearch query (in this example from a client, using its 'assets' member's `select()` method).
2. Chain as many `includeOnResults` calls as you like. Each method call should include a searchable Atlan field you want to include on each search result. (And this can include relationship attributes as well, such as the columns in a table in this example.)
3. You can then run the search as you like (in this example, streaming the results directly).

### Raw REST API

```json showLineNumbers title="POST /api/meta/search/indexsearch"
{
 "dsl": { // (1)
 "query": {
 ...
 },
 "from": 0,
 "size": 100,
 "track_total_hits": true
 },
 "attributes": [ // (2)
 "createTime",
 "updateTime",
 "columns"
 ],
 "suppressLogs": true,
 "showSearchScore": false,
 "excludeMeanings": false,
 "excludeClassifications": false
}
```

1. Define the search query as you normally would.
2. Specify the list of attributes you want to include on each result in the `attributes` list of the request.

## Include relationship properties

You can also specify which attributes you want to include on each *relationship* in each search result:

### Java

```java showLineNumbers title="Include relationship properties"
client.assets.select() // (1)
 .includeOnResults(Table.COLUMNS) // (2)
 .includeOnRelations(Column.NAME) // (3)
 .stream() // (4)
 ...
```

1. Start building a FluentSearch query (in this example from a client, using its 'assets' member's `select()` method).
2. Chain as many `includeOnResults` calls as you like, to include one or more relationships on each search result.
3. Then chain as many `includeOnRelations` calls as you like. Each method call should include a searchable Atlan field you want to include on each *relationship* included in each search result. (In this example, every related column that comes back for each search result will include the column's name.)
4. You can then run the search as you like (in this example, streaming the results directly).

### Python

```python showLineNumbers title="Include relationship properties"
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Table, Column
from pyatlan.model.fluent_search import FluentSearch

client = AtlanClient()
request = (
 FluentSearch.select() # (1)
 .include_on_results(Table.COLUMNS) # (2)
 .include_on_relations(Column.NAME) # (3)
).to_request() # (4)
results = client.asset.search(criteria=request)
```

1. Start building a FluentSearch query (in this example using its `select()` method directly).
2. Chain as many `include_on_results` calls as you like, to include one or more relationships on each search result.
3. Then chain as many `include_on_relations` calls as you like. Each method call should include a searchable Atlan field you want to include on each *relationship* included in each search result. (In this example, every related column that comes back for each search result will include the column's name.)
4. You can then run the search as you like (in this example, converting to a request and running the search using the request).

### Kotlin

```kotlin showLineNumbers title="Include asset properties"
client.assets.select() // (1)
 .includeOnResults(Table.COLUMNS) // (2)
 .includeOnRelations(Column.NAME) // (3)
 .stream() // (4)
 ...
```

1. Start building a FluentSearch query (in this example from a client, using its 'assets' member's `select()` method).
2. Chain as many `includeOnResults` calls as you like, to include one or more relationships on each search result.
3. Then chain as many `includeOnRelations` calls as you like. Each method call should include a searchable Atlan field you want to include on each *relationship* included in each search result. (In this example, every related column that comes back for each search result will include the column's name.)
4. You can then run the search as you like (in this example, streaming the results directly).

### Raw REST API

```json showLineNumbers title="POST /api/meta/search/indexsearch"
{
 "dsl": { // (1)
 "query": {
 ...
 },
 "from": 0,
 "size": 100,
 "track_total_hits": true
 },
 "attributes": [ // (2)
 "columns"
 ],
 "relationAttributes": [ // (3)
 "name"
 ]
 "suppressLogs": true,
 "showSearchScore": false,
 "excludeMeanings": false,
 "excludeClassifications": false
}
```

1. Define the search query as you normally would.
2. Specify the list of attributes (relationships) you want to include on each result in the `attributes` list of the request.
3. Specify the list of attributes you want to include on each *relationship* in each search result in the `relationAttributes` list of the request.

:::warning[Only first-degree attributes and relationships]
It's currently only possible to include details for first-degree attributes and first-degree relationships and their attributes. If you want to see the attributes of related assets' relationships you must run a second search.
:::

---
