You need an existing collection with points. See Insert points to add data first.
Delete a single point
The following example removes a single point by ID.Delete multiple points
Deleting a nonexistent point does not cause an error — the operation completes successfully regardless of whether the point exists. The following example removes multiple points at once.Compact a collection
After deleting points, run a compaction operation to reclaim storage space and optimize the index. Thecompact() method is an alias for optimize().
Compaction permanently removes deleted points from storage, rebuilds the index structure, and reclaims disk space. Run compaction after large-scale deletions to maintain optimal performance.