# `MnemosyneZvex.Backend`

Mnemosyne `GraphBackend` implementation backed by a per-repo Zvex collection
and a DETS sidecar.

## Options

  * `:path` - required. Directory under which `zvex/` and `sidecar.dets`
    will live.
  * `:dimension` - required positive integer. Embedding dimension; must
    match the Mnemosyne `embedding` adapter.
  * `:index` - `:hnsw | :ivf | :flat`. Default `:hnsw`.
  * `:metric` - `:cosine | :l2 | :ip`. Default `:cosine`.
  * `:index_opts` - keyword list of index-specific options. Default
    `[m: 16, ef_construction: 200]`.
  * `:fetch_multiplier` - over-fetch factor for `find_candidates/6`. Default
    `3`. Larger values give the value function more candidates to rerank
    at the cost of NIF work.

# `t`

```elixir
@type t() :: %MnemosyneZvex.Backend{
  collection: Zvex.Collection.t(),
  dimension: pos_integer(),
  fetch_multiplier: pos_integer(),
  index: atom(),
  metric: atom(),
  sidecar: MnemosyneZvex.Sidecar.t()
}
```

# `close`

```elixir
@spec close(t()) :: :ok
```

Closes both the Zvex collection and the DETS sidecar.

---

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