Expand description
Vector dataset access nodes via the vectordata crate.
Each node takes a dataset source string (URL, local path, or catalog name) as a const parameter and loads the dataset handle at construction time.
Source specifier formats:
"dataset"— catalog lookup, uses default profile"dataset:profile"— catalog lookup with explicit profile"https://..."— direct URL"/path/to/dir"— local filesystem path
§Prebuffering
Use dataset_prebuffer("source") to eagerly download all facets
for a dataset before workload execution. After prebuffering, data
access uses local mmap readers (zero HTTP overhead).
§Cache-aware loading
For catalog-resolved datasets, the loader checks the local cache
at ~/.cache/vectordata/<dataset>/ before issuing HTTP requests.
Prebuffering populates this cache; subsequent loads are local.
Feature-gated behind vectordata.
§Upstream API reference
See the vectordata consumer guide for the full dataset access,
catalog, caching, and fetch model — the crate’s AGENTS.md,
rendered as vectordata::_agents:
https://docs.rs/vectordata/latest/vectordata/_agents/index.html
Modules§
- fixtures
- The small predicated dataset vectordata embeds for tests: 190 base
vectors and 10 queries with record metadata, a layout that types
every field, a mixed predicate set, the rows each predicate admits
and all three ground truths.
predicatedwrites it to a directory, which a source string then names by path. It is regenerated from the dataset pipeline, so a test asserts properties of it and not particular rows.
Structs§
- Admitted
Rows At - The base positions the predicate of query
indexadmits, as a set: vectordata’s admitted-row set over the query’smetadata_resultsrecord, on anadmitted_rowswire. Wheremetadata_results_atputs the whole list on a wire, this is a handle to the record that reads nothing until it is asked, byadmitted_rows_contain, byadmitted_rows_len, or by a host that keeps the value and asks it directly (Value::Dataset(DatasetValue::AdmittedRows(set)), wheresetis vectordata’sOrdinalSet). Holding one keeps the record’s storage open. The query index wraps modulo the facet’s rows. A profile whose base window does not start at zero is refused with vectordata’s reason. - Admitted
Rows Contain - Whether the admitted rows
rows, fromadmitted_rows_at, hold the base positionordinal: whether the query’s predicate admits that base vector. - Admitted
Rows Len - How many base positions the admitted rows
rows, fromadmitted_rows_at, hold. - Base
Facet - The
basefacet of a dataset. - Dataset
Distance Function - Return the dataset’s distance function (e.g., “COSINE”, “EUCLIDEAN”). Operates on the dataset group; takes a group or prebuffered handle.
- Dataset
Facets - Report which facets are available for the default profile of a dataset group as a comma-separated list. Expects a group or prebuffered handle.
- Dataset
Group Open dataset_group_open(source: str) -> Handle- Dataset
Open dataset_open(source: str, facet: str) -> Handle- Dataset
Prebuffer - Eagerly download all facets for a dataset profile into the
local cache, returning a dataset handle that every facet
accessor and every group accessor takes as its first
argument. After this returns, every subsequent facet read
served by
vectordata::TestDataViewhits the merkle- verified mmap fast path with no further network traffic. - Dataset
Profile Count - Total number of profiles in a dataset group.
- Dataset
Profile Name At - Look up a profile name by index from the canonical sorted list.
- Dataset
Profile Names - Comma-separated list of all profile names in canonical sort order (by base_count).
- Filtered
Neighbor Distances At - Access filtered ground-truth neighbor distances. Expects an F32
handle.
filtered_neighbor_distancesis the legacy name of the prefiltered facet, so this reads whatprefiltered_neighbor_distances_atreads. - Filtered
Neighbor Distances Facet - The
filtered_neighbor_distancesfacet of a dataset. - Filtered
Neighbor Indices At - Access filtered ground-truth neighbor indices. Expects an I32
handle.
filtered_neighbor_indicesis the legacy name of the prefiltered facet, so this reads whatprefiltered_neighbor_indices_atreads. - Filtered
Neighbor Indices Facet - The
filtered_neighbor_indicesfacet of a dataset. - Matching
Profile Name At - Name of the
index-th profile matchingpattern, in canonical (base-count-ascending) order. Pairs withprofile_partitions’s masked-positionidx_ofso a sweep can prebuffer the active tier’s own ground-truth facets (dataset_prebuffer(str_concat("ds:", name))).patternfollows the literal / glob / regex promotion; the index wraps modulo the number of matching profiles; empty string if none match. - Matching
Profiles - Return profile names matching a prefix, comma-separated.
- Metadata
Content Count - Count of metadata content records. Expects a Generic handle.
- Metadata
Content Facet - The
metadata_contentfacet of a dataset. - Metadata
Count Of - How many records carry the metadata value
value. - Metadata
Ordinals Of - The base ordinals whose metadata value is
value, ascending. - Metadata
Predicates Facet - The
metadata_predicatesfacet of a dataset. - Metadata
Results At - Access metadata indices (variable-length matching base ordinals per query) at an index. Expects an Ivvec32 handle.
- Metadata
Results Count - Return the metadata indices count (number of predicate result sets). Expects an Ivvec32 handle.
- Metadata
Results Facet - The
metadata_resultsfacet of a dataset. - Metadata
Results LenAt - Return the length of one metadata_results record without loading the data (reads only the 4-byte header). Expects an Ivvec32 handle.
- Metadata
Value At - Access a metadata value per base ordinal. Expects a Generic
handle opened against the
metadata_contentfacet. - Neighbor
Count - Return the per-record neighbor count (k) for an I32 neighbor-indices handle.
- Neighbor
Distances At - Access ground-truth neighbor distances for a query. Expects an F32 handle.
- Neighbor
Distances Facet - The
neighbor_distancesfacet of a dataset. - Neighbor
Empty Rows - How many queries have no live neighbor in the
unfiltered (
neighbor_indices) ground truth, as vectordata counts its coverage. A depth of zero, or deeper than the facet, is refused. - Neighbor
Full Rows - How many queries have at least
klive neighbors in the unfiltered (neighbor_indices) ground truth, as vectordata counts its coverage. A depth of zero, or deeper than the facet, is refused. - Neighbor
Indices At - Access ground-truth neighbor indices for a query. Expects an I32 handle.
- Neighbor
Indices Facet - The
neighbor_indicesfacet of a dataset. - Neighbor
Live Depth At - How many live neighbors a query has in the
unfiltered (
neighbor_indices) ground truth: the length of its row before the padding. - Neighbor
Live Indices At - The live neighbors of a query in the
unfiltered (
neighbor_indices) ground truth: the base positions its row names, nearest first, without the padding a row carries when it has fewer neighbors than the facet is deep. As long as the row’s live depth, so shorter than the facet’s width for a padded row and empty for a query with no neighbor. - Neighbor
Recall Ceiling - The recall at
ka perfect search would score against the unfiltered (neighbor_indices) ground truth when every query is scored out ofk: vectordata’s coverage ceiling. 1.0 when every query haskneighbors, and less by the share of slots no neighbor exists for. A depth of zero, or deeper than the facet, is refused. - Postfiltered
Neighbor Distances At - Access the distances of a query’s postfiltered ground-truth
neighbors, in the order of
postfiltered_neighbor_indices_at. Expects an F32 handle. - Postfiltered
Neighbor Distances Facet - The
postfiltered_neighbor_distancesfacet of a dataset. - Postfiltered
Neighbor Empty Rows - How many queries have no live neighbor in the
postfiltered (
postfiltered_neighbor_indices) ground truth, as vectordata counts its coverage. A depth of zero, or deeper than the facet, is refused. - Postfiltered
Neighbor Full Rows - How many queries have at least
klive neighbors in the postfiltered (postfiltered_neighbor_indices) ground truth, as vectordata counts its coverage. A depth of zero, or deeper than the facet, is refused. - Postfiltered
Neighbor Indices At - Access the postfiltered ground-truth neighbor indices of a query:
its unfiltered nearest neighbors with those its predicate does not
admit removed, in rank order. A row with fewer survivors than the
facet’s depth is padded with
-1. Expects an I32 handle. - Postfiltered
Neighbor Indices Facet - The
postfiltered_neighbor_indicesfacet of a dataset. - Postfiltered
Neighbor Live Depth At - How many live neighbors a query has in the
postfiltered (
postfiltered_neighbor_indices) ground truth: the length of its row before the padding. - Postfiltered
Neighbor Live Indices At - The live neighbors of a query in the
postfiltered (
postfiltered_neighbor_indices) ground truth: the base positions its row names, nearest first, without the padding a row carries when it has fewer neighbors than the facet is deep. As long as the row’s live depth, so shorter than the facet’s width for a padded row and empty for a query with no neighbor. - Postfiltered
Neighbor Recall Ceiling - The recall at
ka perfect search would score against the postfiltered (postfiltered_neighbor_indices) ground truth when every query is scored out ofk: vectordata’s coverage ceiling. 1.0 when every query haskneighbors, and less by the share of slots no neighbor exists for. A depth of zero, or deeper than the facet, is refused. - Predicate
At - The predicate of query
index, as structure: which offormsit takes, and its ordinal. A host selects the statement it prepared for that form and binds the predicate’s record through the form’s binder. Nothing is read and nothing is allocated here. The query index wraps modulo the facet’s predicates. - Predicate
Band At - The selectivity band of the predicate of query
index, one ofpredicate_bands, or empty for a predicate whose recorded selectivity no band is read from. Refused when the facet publishes no strata. The query index wraps modulo the facet’s predicates. - Predicate
Bands - The distinct selectivity bands of a dataset’s predicates, widest first and comma-joined, or empty when the facet publishes none. A constant.
- Predicate
Count Of - How many queries carry the predicate value
value. - Predicate
Families - The distinct families of a dataset’s predicates, sorted and comma-joined, or empty when the facet publishes none. A constant.
- Predicate
Family At - The family of the predicate of query
index, one ofpredicate_families. Refused when the facet publishes no strata. The query index wraps modulo the facet’s predicates. - Predicate
Field Names - The metadata fields a dataset’s predicates constrain, sorted and comma-joined: the fields a target indexes to serve them. A constant.
- Predicate
Form At - The key of the form the predicate of query
indextakes, such ascitation_percentile.range_topic_l3.eq: the identifier the dataset publishes for the form, the same for every query of the form, so it labels a series. Read fromforms; no facet is read and the query index wraps modulo the facet’s predicates. - Predicate
Form Keys - The distinct keys of the forms a dataset’s predicates take, sorted
and comma-joined: every value
predicate_form_atgives. A constant, so it is read when the program is built. - Predicate
Forms - The forms of a dataset’s predicates: every distinct form its
metadata_predicatesrecords take, with the form’s template and count, the form of the predicate at each ordinal, the strata the facet publishes, and the layout of the metadata records the conditions bind against. A constant: the facet is read once, when the program is built. - Predicate
Ordinals Of - The query ordinals whose predicate value is
value, ascending. - Predicate
Text At - The predicate of query
index, rendered as text by the packaged vernacularvernacular, comparands inline. An unknown vernacular is refused with the names that exist. The query index wraps modulo the facet’s predicates. - Predicate
Value At - Access a predicate value per query ordinal. Expects a Generic
handle opened against the
metadata_predicatesfacet. - Prefiltered
Neighbor Distances At - Access the distances of a query’s prefiltered ground-truth
neighbors, in the order of
prefiltered_neighbor_indices_at. Expects an F32 handle. - Prefiltered
Neighbor Distances Facet - The
prefiltered_neighbor_distancesfacet of a dataset. - Prefiltered
Neighbor Empty Rows - How many queries have no live neighbor in the
prefiltered (
prefiltered_neighbor_indices) ground truth, as vectordata counts its coverage. A depth of zero, or deeper than the facet, is refused. - Prefiltered
Neighbor Full Rows - How many queries have at least
klive neighbors in the prefiltered (prefiltered_neighbor_indices) ground truth, as vectordata counts its coverage. A depth of zero, or deeper than the facet, is refused. - Prefiltered
Neighbor Indices At - Access the prefiltered ground-truth neighbor indices of a query:
its nearest neighbors among the base vectors its predicate admits,
nearest first. A row with fewer admitted vectors than the facet’s
depth is padded with
-1. Expects an I32 handle. - Prefiltered
Neighbor Indices Facet - The
prefiltered_neighbor_indicesfacet of a dataset. - Prefiltered
Neighbor Live Depth At - How many live neighbors a query has in the
prefiltered (
prefiltered_neighbor_indices) ground truth: the length of its row before the padding. - Prefiltered
Neighbor Live Indices At - The live neighbors of a query in the
prefiltered (
prefiltered_neighbor_indices) ground truth: the base positions its row names, nearest first, without the padding a row carries when it has fewer neighbors than the facet is deep. As long as the row’s live depth, so shorter than the facet’s width for a padded row and empty for a query with no neighbor. - Prefiltered
Neighbor Recall Ceiling - The recall at
ka perfect search would score against the prefiltered (prefiltered_neighbor_indices) ground truth when every query is scored out ofk: vectordata’s coverage ceiling. 1.0 when every query haskneighbors, and less by the share of slots no neighbor exists for. A depth of zero, or deeper than the facet, is refused. - Profile
Base Count - Return the base vector count for the profile at a given index.
- Profile
Facets - Return the comma-separated facet list for the profile at a given index.
- Profile
Partitions - Partition a dataset’s vector space by its profiles matching a
pattern, treated as cumulative size tiers (a partition source,
cursor_partitions.md §7.1). One partition per masked profile, in canonical
(base-count-ascending) order: partition
kspans[prev_masked_base_count, this_masked_base_count)— exactly the vectors added at that tier — so a sweep’s “load only the increment since the previously loaded set” is just the partition’s[start_of(p), end_of(p)), and a partition inherently knows its start (no cross-iteration carry needed).idx_of(p)is the 0-based masked position (pairs withmatching_profile_name_atto address the tier’s own ground-truth facets);count_of(p)is the number of masked tiers;base_extentis the largest masked tier’s size. - Query
Count - Return the count of query vectors. Counts the query facet of a
source string or prebuffered handle, as
vector_countcounts the base facet. - Query
Facet - The
queryfacet of a dataset. - Query
Vector At - Access a query vector by index. Reads the query facet of a
source string or prebuffered handle, as
vector_atreads the base facet. - Record
At - The metadata record of base vector
index, as structure: its ordinal among the recordsformsdescribes. A host binds the record’s fields throughforms.binderto the statement it prepared from the layout. Nothing is read and nothing is allocated here. The index wraps modulo the record count. - Record
Bool At - The boolean field
field, resolved byrecord_field_bool, of the metadata record atindex. Nothing is checked per record. - Record
Bytes At - The bytes field
field, resolved byrecord_field_bytes, of the metadata record atindex. Nothing is checked per record. - Record
F64At - The floating-point field
field, resolved byrecord_field_f64, of the metadata record atindex. Nothing is checked per record. - Record
Field Bool - Resolve a boolean field of a dataset’s metadata records, for
record_bool_atto read. Refused when the records have no such field, when the field is not a boolean, and when the dataset declares it may be null. - Record
Field Bytes - Resolve a bytes field of a dataset’s metadata records, for
record_bytes_atto read. Refused when the records have no such field, when the field is not a blob, and when the dataset declares it may be null. - Record
Field F64 - Resolve a floating-point field of a dataset’s metadata records, for
record_f64_atto read. A 16-bit or 32-bit field reads asf64without loss. Refused when the records have no such field, when the field is not a float, and when the dataset declares it may be null. - Record
Field I64 - Resolve an integer field of a dataset’s metadata records, for
record_i64_atto read. A 16-bit or 32-bit field reads asi64without loss. Refused when the records have no such field, when the field is not an integer, and when the dataset declares it may be null. - Record
Field Names - The names of the fields of a dataset’s metadata records, in layout order, comma-joined: what a column list or an iteration over the fields takes. A constant.
- Record
Field Str - Resolve a text field of a dataset’s metadata records, for
record_str_atto read. The name is resolved to its position in the layout here, once. Refused when the records have no such field, when the field is not text, and when the dataset declares it may be null. Expects the metadata_content facet of a profile that publishes records. - Record
Forms - The form of a dataset’s metadata records: the layout that names and types a record’s fields, with the binder that reads every field in layout order. A record facet has this one form. A constant.
- Record
I64At - The integer field
field, resolved byrecord_field_i64, of the metadata record atindex. Nothing is checked per record. - Record
Layout Text - The layout of a dataset’s metadata records, rendered as text by the
packaged vernacular
vernacular: the text one record stands for, such as a schema’s column definitions, before any record is read. A constant. An unknown vernacular is refused with the names that exist. - Record
StrAt - The text field
field, resolved byrecord_field_str, of the metadata record atindex. Nothing is checked per record. - Record
Text At - The metadata record of base vector
index, rendered as text by the packaged vernacularvernacular. An unknown vernacular is refused with the names that exist. The index wraps modulo the record count. - Vector
At - Access an
f32vector by index, returning a typedVecF32. Reads the base facet of a source string or prebuffered handle, and whatever facet an opened F32 handle names. - Vector
Count - Return the count of records in the facet a handle was opened
against. This is the canonical “how many vectors / queries /
neighbor-rows” accessor —
vector_count(base_handle)for base vectors,vector_count(query_handle)for query vectors, etc. A source string or prebuffered handle counts the base facet. - Vector
Dim - Return the dimensionality (
f32count per record) of a vector facet handle.