IUseHybridSearchOptions
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Options for the useHybridSearch hook.
export interface IUseHybridSearchOptions<I extends SearchItem> extends Pick<SemanticSearchHookInput, "deepSearch" | "limit" | "includeTags" | "excludeTags" | "objectTypes">
Extends: Pick<SemanticSearchHookInput, “deepSearch” | “limit” | “includeTags” | “excludeTags” | “objectTypes”>
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
boolean | (ALPHA) (Optional) Allow semantic search. default: true | ||
(ALPHA) (Optional) The backend to use for the search. If omitted, will be retrieved from the context. | |||
number | (ALPHA) (Optional) Debounce time in milliseconds for search query. default: 150 | ||
(ALPHA) Item builder for the search results. If provided, the item builder will be used to transform the search results into a different format. The item builder should return the transformed item. | |||
(ALPHA) (Optional) Custom matcher for the search results. If provided, the matcher will be used to filter the search results. The matcher should return true if the item should be included in the search results, and false otherwise. | |||
string | (ALPHA) (Optional) The workspace to use for the search. If omitted, will be retrieved from the context. |
Property details
IUseHybridSearchOptions.allowSematicSearchpropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Allow semantic search. default: true
allowSematicSearch?: boolean;
IUseHybridSearchOptions.backendpropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
The backend to use for the search. If omitted, will be retrieved from the context.
backend?: IAnalyticalBackend;
IUseHybridSearchOptions.debounceMspropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Debounce time in milliseconds for search query. default: 150
debounceMs?: number;
IUseHybridSearchOptions.itemBuilderpropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Item builder for the search results. If provided, the item builder will be used to transform the search results into a different format. The item builder should return the transformed item.
itemBuilder: HybridSearchItemBuilder<I>;
IUseHybridSearchOptions.matcherpropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Custom matcher for the search results. If provided, the matcher will be used to filter the search results. The matcher should return true if the item should be included in the search results, and false otherwise.
matcher?: HybridSearchMatcher;
IUseHybridSearchOptions.workspacepropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
The workspace to use for the search. If omitted, will be retrieved from the context.
workspace?: string;