diff --git a/mobile/lib/db/ml/clip_vector_db.dart b/mobile/lib/db/ml/clip_vector_db.dart index 760fe38627..eb28181d3c 100644 --- a/mobile/lib/db/ml/clip_vector_db.dart +++ b/mobile/lib/db/ml/clip_vector_db.dart @@ -111,6 +111,21 @@ class ClipVectorDB { } } + Future<(int, int, int)> getIndexStats() async { + final db = await _vectorDB; + try { + final stats = await db.getIndexStats(); + return ( + stats.$1.toInt(), + stats.$2.toInt(), + stats.$3.toInt(), + ); + } catch (e, s) { + _logger.severe("Error getting index stats", e, s); + rethrow; + } + } + Future<(Uint64List, Float32List)> searchClosestVectors( List query, int count,