AshArcadic.DataLayer.Verifiers.ValidateSparseVectorIndex (AshArcadic v0.1.0)

Copy Markdown View Source

Compile-verifier for arcade do sparse_vector_index … end (build-blocking under --warnings-as-errors). A sparse index declares a (tokens, weights) attribute PAIR; BOTH attributes must be:

  • V1 — a STORED attribute: declared AND not in skip (a skipped attribute is never persisted as an ArcadeDB property, so an index over it would target nothing).
  • V2 — NOT sensitive (AGENTS.md Rule 3): a sparse index property is a plaintext numeric array; a sensitive attribute must be encrypted-binary, which cannot be an array index.
  • V3 — array-typed (best-effort): tokens must be an integer array, weights a float array; a scalar-typed attribute cannot hold a sparse-vector component. Checks the type SHAPE.

Plus: V4 — a unique name, across BOTH sparse_vector_index AND vector_index names (a collision means a vector-search preparation could not disambiguate); and tokens and weights must be DISTINCT attributes (the same attribute cannot be both slots).

Value-free: messages carry the attribute/index NAME (developer config, not row data), never a value.