ISemanticSearchQuery
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Semantic search query.
export interface ISemanticSearchQuery
Methods
Method | Description |
|---|---|
(BETA) Execute the search. | |
(BETA) Filter relationships and results based on allowed relationship type combinations. When specified, only relationships matching the allowed types are returned. | |
(BETA) Define whether the search should be deep or not. | |
(BETA) The list of tags the returned objects must not have. | |
(BETA) The list of tags the returned objects must have. | |
(BETA) Define a limit for the number of results returned by the search. | |
(BETA) Define a list of object types to search for. | |
(BETA) Define a search term for the search. |
Method details
ISemanticSearchQuery.query()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Execute the search.
query(options?: {
signal?: AbortSignal;
}): Promise<ISemanticSearchResult>;
Parameters
Parameter | Type | Description |
|---|---|---|
options | { signal?: AbortSignal; } | (Optional) |
Returns
Promise<ISemanticSearchResult>
ISemanticSearchQuery.withAllowedRelationshipTypes()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Filter relationships and results based on allowed relationship type combinations. When specified, only relationships matching the allowed types are returned.
withAllowedRelationshipTypes(types: IAllowedRelationshipType[]): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
types |
Returns
ISemanticSearchQuery.withDeepSearch()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Define whether the search should be deep or not.
withDeepSearch(deepSearch: boolean): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
deepSearch | boolean |
Returns
ISemanticSearchQuery.withExcludeTags()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
The list of tags the returned objects must not have.
withExcludeTags(tags: string[]): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
tags | string[] |
Returns
ISemanticSearchQuery.withIncludeTags()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
The list of tags the returned objects must have.
withIncludeTags(tags: string[]): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
tags | string[] |
Returns
ISemanticSearchQuery.withLimit()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Define a limit for the number of results returned by the search.
withLimit(limit: number): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
limit | number |
Returns
ISemanticSearchQuery.withObjectTypes()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Define a list of object types to search for.
withObjectTypes(types: GenAIObjectType[]): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
types |
Returns
ISemanticSearchQuery.withQuestion()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer.
Define a search term for the search.
withQuestion(question: string): ISemanticSearchQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
question | string |
Returns