Skip to main content

KIND_HNSW

Constant KIND_HNSW 

Source
pub const KIND_HNSW: u8 = 0x05;
Expand description

Phase 7d.3: a single HNSW node’s per-layer neighbor lists, serialized into one cell. Body layout (after the shared cell_length | kind_tag prefix):

  node_id       zigzag varint   the rowid this graph node represents
  max_layer     varint          highest layer this node lives in
  for each layer 0..=max_layer:
    count       varint          number of neighbors at this layer
    for each:   zigzag varint   neighbor node_id

peek_rowid works uniformly on this kind because it just reads the first varint after the kind tag — exactly the node_id here.