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