mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Improve the way docs are indexed and FTS results are ranked, so results are more relevant. Also improve debouncing and searching UX so it feels a bit faster and you can scan the results more easily.
32 lines
640 B
TypeScript
32 lines
640 B
TypeScript
export type Json = Record<
|
|
string,
|
|
string | number | boolean | null | Json[] | { [key: string]: Json }
|
|
>
|
|
|
|
export type Section = {
|
|
content: string
|
|
heading?: string
|
|
slug?: string
|
|
}
|
|
|
|
export abstract class BaseLoader {
|
|
type: string
|
|
|
|
constructor(public source: string, public path: string) {}
|
|
|
|
abstract load(): Promise<BaseSource[]>
|
|
}
|
|
|
|
export abstract class BaseSource {
|
|
type: string
|
|
checksum?: string
|
|
meta?: Json
|
|
sections?: Section[]
|
|
|
|
constructor(public source: string, public path: string) {}
|
|
|
|
abstract process(): { checksum: string; meta?: Json; sections: Section[] }
|
|
|
|
abstract extractIndexedContent(): string
|
|
}
|