Full text search improvements

This commit is contained in:
Zef Hemel
2022-10-22 20:23:54 +02:00
parent 02dd2f17c7
commit 9164b57a3e
6 changed files with 55 additions and 15 deletions
+13 -2
View File
@@ -8,6 +8,17 @@ export function fullTextDelete(key: string) {
return syscall("fulltext.delete", key);
}
export function fullTextSearch(phrase: string, limit = 100) {
return syscall("fulltext.search", phrase, limit);
export type FullTextSearchOptions = {
limit?: number;
highlightPrefix?: string;
highlightPostfix?: string;
highlightEllipsis?: string;
summaryMaxLength?: number;
};
export function fullTextSearch(
phrase: string,
options: FullTextSearchOptions = {},
) {
return syscall("fulltext.search", phrase, options);
}