> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# ISemanticSearchQuery

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/workspace/genAI/index.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Semantic search query.

**Signature:**

```typescript
export interface ISemanticSearchQuery 
```

## Methods

| Method | Description |
| --- | --- |
| [query(options)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchqueryquery) | **_(BETA)_** Execute the search. |
| [withAllowedRelationshipTypes(types)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithallowedrelationshiptypes) | **_(BETA)_** Filter relationships and results based on allowed relationship type combinations. When specified, only relationships matching the allowed types are returned. |
| [withDeepSearch(deepSearch)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithdeepsearch) | **_(BETA)_** Define whether the search should be deep or not. |
| [withExcludeTags(tags)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithexcludetags) | **_(BETA)_** The list of tags the returned objects must not have. |
| [withIncludeTags(tags)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithincludetags) | **_(BETA)_** The list of tags the returned objects must have. |
| [withLimit(limit)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithlimit) | **_(BETA)_** Define a limit for the number of results returned by the search. |
| [withObjectTypes(types)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithobjecttypes) | **_(BETA)_** Define a list of object types to search for. |
| [withQuestion(question)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md#isemanticsearchquerywithquestion) | **_(BETA)_** Define a search term for the search. |

## Method details

### ISemanticSearchQuery.query()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Execute the search.

**Signature:**

```typescript
query(options?: {
        signal?: AbortSignal;
    }): Promise<ISemanticSearchResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| options | { signal?: AbortSignal; } | _(Optional)_ |

**Returns:**

Promise&lt;[ISemanticSearchResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.isemanticsearchresult/index.md)&gt;

### ISemanticSearchQuery.withAllowedRelationshipTypes()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Filter relationships and results based on allowed relationship type combinations. When specified, only relationships matching the allowed types are returned.

**Signature:**

```typescript
withAllowedRelationshipTypes(types: IAllowedRelationshipType[]): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| types | [IAllowedRelationshipType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iallowedrelationshiptype/index.md)[] |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)

### ISemanticSearchQuery.withDeepSearch()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Define whether the search should be deep or not.

**Signature:**

```typescript
withDeepSearch(deepSearch: boolean): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| deepSearch | boolean |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)

### ISemanticSearchQuery.withExcludeTags()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The list of tags the returned objects must not have.

**Signature:**

```typescript
withExcludeTags(tags: string[]): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| tags | string[] |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)

### ISemanticSearchQuery.withIncludeTags()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The list of tags the returned objects must have.

**Signature:**

```typescript
withIncludeTags(tags: string[]): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| tags | string[] |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)

### ISemanticSearchQuery.withLimit()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Define a limit for the number of results returned by the search.

**Signature:**

```typescript
withLimit(limit: number): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| limit | number |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)

### ISemanticSearchQuery.withObjectTypes()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Define a list of object types to search for.

**Signature:**

```typescript
withObjectTypes(types: GenAIObjectType[]): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| types | [GenAIObjectType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.genaiobjecttype/index.md)[] |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)

### ISemanticSearchQuery.withQuestion()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Define a search term for the search.

**Signature:**

```typescript
withQuestion(question: string): ISemanticSearchQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| question | string |  |

**Returns:**

[ISemanticSearchQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isemanticsearchquery/index.md)
