remove method

Future<int> remove(
  1. String documentId
)

Removes a document's chunks; returns how many were removed.

Implementation

Future<int> remove(String documentId) async {
  final existing = await store.list(filter: Filter.eq('doc_id', documentId));
  if (existing.isEmpty) return 0;
  return store.delete([for (final c in existing) c.id]);
}