MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / remove

Method remove

nodedb-fts/src/codec/doc_id_map.rs:69–72  ·  view source on GitHub ↗

Remove a doc_id from the map. Note: this does NOT compact IDs — the u32 slot becomes a tombstone. The forward map entry is removed so `to_u32` returns None, but the reverse slot keeps the string for in-flight references. New assignments always use the next sequential ID (no reuse).

(&mut self, doc_id: &str)

Source from the content-addressed store, hash-verified

67 /// reverse slot keeps the string for in-flight references. New assignments
68 /// always use the next sequential ID (no reuse).
69 pub fn remove(&mut self, doc_id: &str) {
70 self.forward.remove(doc_id);
71 // Reverse entry stays as tombstone — do not shift IDs.
72 }
73
74 /// Serialize the map to bytes for persistence.
75 ///

Callers 7

write_postingsMethod · 0.45
remove_postingsMethod · 0.45
remove_doc_lengthMethod · 0.45
remove_segmentMethod · 0.45
purge_collectionMethod · 0.45
remove_tombstonesFunction · 0.45
serialization_roundtripFunction · 0.45

Calls

no outgoing calls

Tested by 2

remove_tombstonesFunction · 0.36
serialization_roundtripFunction · 0.36