get lands every vector stored under a key in the arena, one packed row per entry in insertion order, as the scalar you name; an absent key yields no rows.
DenseVectors.stride is the byte pitch of each row and columns its dimensions, as the call reported them, which is how a sub-byte kind like .u1x8 is read without arithmetic on its packing. row refuses an element type other than the kind the rows were written as with Error.InvalidArgument, rather than reinterpreting them.
A cursor walks the index contents, reading each shard’s publication watermark as it enters that shard, so an entry once passed is never revisited.
Without start keys it yields every entry as stored; with them, the starts’ own entries first, then the entries those link to breadth-first, each once.
Each pull lands up to wanted keys in the arena, and the keys each links to when links is true; the vectors themselves come from get.
A search stream is a resumable best-first traversal, so callers that post-filter aggressively pull until satisfied instead of guessing the “k” upfront.
It keeps walk state rather than a thread, so any number may stay open on one executor, and every pull is an ordinary verb naming the index again, so it runs on whichever receiver pulls.
var stream = try usearch.DenseSearchStream.init(index, try .ofRow(f32, &query), .{});defer stream.deinit();while (true) { const found = try (try index.on(executor).searchStreamNext(stream, 16, &arena)).query(0); if (found.keys.len == 0) break; // drained for (found.keys, found.scores) |key, distance| std.debug.print("{f} at {d}\n", .{ key, distance });}
A drained walk answers an empty query, as the C interface does, so a loop ends on the first pull that lands nothing.
sample draws keys around focus, or across the whole index, each hanging from a shown or earlier draw and placed in three dimensions beside the shown keys already on screen, so a view grows one connected sample as it zooms.
Equal seeds, shown keys and focus draw equally, and a larger wanted draws a superset.
StructDenseVectorsRows a call wrote packed into an arena - get one per entry under the key, attend one per query, a cursor pull one per entry - stride bytes apiece, which sub-byte kinds round up to whole bytes.3
rowOne row as a run of Element, the type the rows were written as; any other type and a position past rows are refused with Error.InvalidArgument, a stale view with Error.Uninitialized, and device memory with Error.Device.
StructDenseCursorBatchOne batch a DenseCursor pull wrote into an arena: the keys, and the keys each links to where asked for; the vectors themselves come from DenseIndex.get.2
linksThe keys one entry links to, refusing a position past written or a pull that exported no links with Error.InvalidArgument, and a stale view or device memory as keys does.
StructDenseDrawsThe draws DenseIndex.sample wrote in an arena, one per draw: its key, which of that key's entries it is, the shown or earlier draw it hangs from, and where it is placed.2
Every pull names the index again, through DenseIndex.cursorNext, so free the cursor
before the index. Mirrors usearch_dense_cursor_t.
Fields
handle
?*anyopaque
The opaque usearch_dense_cursor_t the ABI hands back.
initOpens a walk over the current contents; each shard's publication watermark is read as the walk enters it, so an entry once passed is never revisited.
Without starts it yields every
entry as stored; with them, the start keys' own entries first in order, then the entries
those link to breadth-first, each once. Calls usearch_dense_cursor_init.
deinitReleases the cursor, waiting for every deferred pull naming it.
Best-first traversal is naturally pausable, so the stream keeps a live frontier and visited
set and yields matches lazily - callers that post-filter aggressively pull until satisfied
instead of guessing "k" upfront. It keeps walk state rather than a thread, and every pull names
the index again through DenseIndex.searchStreamNext, so free the stream before the index.
Mirrors usearch_dense_search_stream_t.
Fields
handle
?*anyopaque
The opaque usearch_dense_search_stream_t the ABI hands back.
initOpens a stream for one query row, refusing a run of several with Error.ShapeMismatch.