# `Arex.Vector`
[🔗](https://github.com/m/exarcade/blob/v0.1.0/lib/arex/vector.ex#L1)

Vector search helpers for ArcadeDB dense, sparse, and hybrid retrieval.

`Arex.Vector` wraps the ArcadeDB SQL surface for vector properties, dense
`LSM_VECTOR` indexes, sparse `LSM_SPARSE_VECTOR` indexes, nearest-neighbor
queries, and hybrid fusion.

Use this module when the raw SQL is too repetitive or too easy to get wrong.
It keeps the public API focused on the practical tasks most application code
cares about:

- declaring the right property types for embeddings
- building dense and sparse vector indexes with validated options
- issuing nearest-neighbor queries with structured parameters
- composing hybrid fusion queries without hand-building metadata JSON

The goal is not to hide the underlying ArcadeDB model, but to make the
common vector workflows safer and easier to read.

# `create_dense_index`

Creates a dense `LSM_VECTOR` index on an embedding property.

# `create_embedding_property`

Creates an embedding property with the correct ArcadeDB type for the selected encoding.

# `create_sparse_index`

Creates a sparse `LSM_SPARSE_VECTOR` index on token and weight properties.

# `create_sparse_properties`

Creates the token and weight properties required for sparse vector indexes.

# `fuse`

Runs a hybrid vector fusion query from multiple ranked SQL sub-pipelines.

# `index_ref`

Builds the ArcadeDB index reference string `Type[property]`.

# `neighbors`

Runs a dense nearest-neighbor query and returns expanded result rows.

# `sparse_neighbors`

Runs a sparse nearest-neighbor query and returns expanded result rows.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
