2022-10-10 12:50:21 +00:00
|
|
|
import { syscall } from "./syscall.ts";
|
|
|
|
|
|
|
|
export function fullTextIndex(key: string, value: string) {
|
|
|
|
return syscall("fulltext.index", key, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function fullTextDelete(key: string) {
|
|
|
|
return syscall("fulltext.delete", key);
|
|
|
|
}
|
|
|
|
|
2022-10-22 18:23:54 +00:00
|
|
|
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);
|
2022-10-10 12:50:21 +00:00
|
|
|
}
|