From eb0bd4516bbcc9a7a1c230bfae63faab3dbd5d89 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Fri, 13 Oct 2023 17:55:27 +0530 Subject: [PATCH] Minor fixes --- lib/services/semantic_search/semantic_search_service.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/services/semantic_search/semantic_search_service.dart b/lib/services/semantic_search/semantic_search_service.dart index 7e777c5e3..a8fa5f223 100644 --- a/lib/services/semantic_search/semantic_search_service.dart +++ b/lib/services/semantic_search/semantic_search_service.dart @@ -39,6 +39,8 @@ class SemanticSearchService { Future init(SharedPreferences preferences) async { await _loadModel(); await EmbeddingStore.instance.init(preferences); + _startBackFill(); + await EmbeddingStore.instance.pushEmbeddings(); Bus.instance.on().listen((event) async { if (event.status == SyncStatus.diffSynced) { @@ -46,9 +48,8 @@ class SemanticSearchService { } }); Bus.instance.on().listen((event) async { - _addToQueue(event.file); + addToQueue(event.file); }); - _startBackFill(); } Future> search(String query) async { @@ -144,7 +145,7 @@ class SemanticSearchService { return results; } - void _addToQueue(EnteFile file) { + void addToQueue(EnteFile file) { _logger.info("Adding " + file.toString() + " to the queue"); _queue.add(file); _pollQueue();