pub struct IndexSet {
pub nodes_by_label: BTreeMap<String, Cid>,
pub nodes_by_prop: BTreeMap<String, BTreeMap<String, Cid>>,
pub outgoing: Option<Cid>,
pub incoming: Option<Cid>,
pub extra: BTreeMap<String, Ipld>,
}Expand description
Top-level secondary-index aggregator (SPEC §4.8, added in mnem/0.2,
extended with incoming in mnem/0.3).
Fields§
§nodes_by_label: BTreeMap<String, Cid>Map from node label (ntype) to the root CID of a Prolly tree
keyed by NodeId (16 bytes) with values = node CIDs.
nodes_by_prop: BTreeMap<String, BTreeMap<String, Cid>>Two-level map label -> prop_name -> Cid. Each leaf CID is the
root of a Prolly tree keyed by
blake3(canonical_ipld(value))[..16] with values = node CIDs.
outgoing: Option<Cid>Outgoing adjacency index. Prolly tree keyed by source
NodeId whose values are CIDs of AdjacencyBucket objects.
None on a repo without edges.
Historically serialised under the field name adjacency; on
decode both outgoing and the legacy adjacency are accepted.
New writes always emit outgoing.
incoming: Option<Cid>Incoming adjacency index. Prolly tree keyed by destination
NodeId whose values are CIDs of IncomingAdjacencyBucket
objects. None on a repo without edges OR on a repo whose
IndexSet was built by a pre-0.3 implementation (in which case
callers gracefully degrade to “no back-edges known”; see
SPEC §4.8).
extra: BTreeMap<String, Ipld>Forward-compat extension map (SPEC §3.2).