Skip to main content

assemble_batch

Function assemble_batch 

Source
pub fn assemble_batch(
    terms: &[EncodedTerm],
    predicates_by_object: &[Vec<EncodedTerm>],
    resolved: &[Option<String>],
    allow: Option<&HashSet<StrHash>>,
) -> RebuildBatch
Expand description

Assemble one walked batch of (predicate, literal) documents.

Pairs each walked object term with its positional slice of resolved — the concatenation of every term’s hashes_of results, resolved in order — and with the predicates that reference it (predicates_by_object, one list per term, from the O-axis OPSG domain scan). An object under several predicates becomes one document per predicate, which is the index’s (predicate, literal) identity. allow, when set, restricts the posted documents to the configured predicate allowlist; an object with no allowed predicate is intentionally unindexed and is not a missed document.

Both rebuild drivers (the startup shell over RPC clients, the offline CLI over direct store handles) walk with their own scan and resolve surfaces and share THIS core, so document assembly and the indexed-lexical gate cannot drift between them.