API version: 0.3.0

---

# Vector indices

A `vector` stores an embedding. It has to be defined with its shape, so that the search index is created for it before
the first value is written. Vectors are stored in MongoDB (or Neo4j, see [placement](/reference/schemas/placement.md)) and
copied to Elasticsearch, and only get a vector index in Elasticsearch if they ask for one with `"index": "vector"`, see
[indices](/reference/indices.md). Without an index the vector is only stored.

The settings of the vector (`dimensions`, `elementType` and `similarity`) are described once, on the page of the
[vector type](/reference/schemas/types/vector.md). Searching by vector similarity is not part of the API yet, the
definition makes sure that the data is stored in the right shape in the meantime.

```json
{
  "mode": "partial",
  "properties": {
    "embedding": {
      "type": "vector",
      "dimensions": 384,
      "similarity": "cosine",
      "index": "vector"
    }
  }
}
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Fulltext indices](/reference/indices/fulltext.md)

Next: [Geo indices](/reference/indices/geo.md)
