diff --git a/src/search/SearchEngine.ts b/src/search/SearchEngine.ts index e0d70da..957e196 100644 --- a/src/search/SearchEngine.ts +++ b/src/search/SearchEngine.ts @@ -179,7 +179,8 @@ class SearchEngine { this.searchIndexes[doctype] = { index, - lastSeq: info?.update_seq + lastSeq: info?.update_seq, + lastUpdated: new Date().toISOString() } return this.searchIndexes[doctype] } @@ -204,6 +205,7 @@ class SearchEngine { } searchIndex.lastSeq = changes.last_seq + searchIndex.lastUpdated = new Date().toISOString() return searchIndex } diff --git a/src/search/types.ts b/src/search/types.ts index 4bcf3cd..83fb8e5 100644 --- a/src/search/types.ts +++ b/src/search/types.ts @@ -47,7 +47,8 @@ export interface SearchResult { export interface SearchIndex { index: FlexSearch.Document - lastSeq: number + lastSeq: number | null + lastUpdated: string } export type SearchIndexes = {