Minisearch 6.0 refactor ok

This commit is contained in:
Simon Cambier
2022-11-26 12:44:20 +01:00
parent e3ac5a4bac
commit c6cee62214
11 changed files with 194 additions and 125 deletions

View File

@@ -20,12 +20,13 @@ export const EventNames = {
export const enum IndexingStepType {
Done,
LoadingCache,
ReadingNotes,
ReadingPDFs,
ReadingImages,
UpdatingCache,
ReadingFiles,
IndexingFiles,
WritingCache,
}
export type DocumentRef = { path: string; mtime: number }
export type IndexedDocument = {
path: string
basename: string
@@ -51,7 +52,7 @@ export const isSearchMatch = (o: { offset?: number }): o is SearchMatch => {
return o.offset !== undefined
}
export const indexingStep = writable(IndexingStepType.LoadingCache)
export const indexingStep = writable(IndexingStepType.Done)
export type ResultNote = {
score: number