AshArcadic.VectorIndex (AshArcadic v0.1.0)

Copy Markdown View Source

Dense vector-index configuration declared in an arcade do … end block. The %AshArcadic.VectorIndex{} struct is the target of the vector_index DSL entity; it is declaration only — metadata the read path reads at query time (the Type[property] reference, and similarity for distance/threshold semantics), plus compile-time validation (ValidateVectorIndex). AshArcadic does NOT create the index — the host app runs Arcadic.Vector.create_dense_index/5 (there is no migration/DDL machinery here, by the same precedent that leaves endpoint-PK indexes to the host).

name is the vector attribute (a stored, non-sensitive, array-typed property); dimensions and similarity mirror the Arcadic.Vector index metadata.

Summary

Types

similarity()

@type similarity() :: :cosine | :dot_product | :euclidean

t()

@type t() :: %AshArcadic.VectorIndex{
  __spark_metadata__: term(),
  dimensions: pos_integer(),
  name: atom(),
  similarity: similarity()
}