Install OpenData Vector
Download and install the Vector binary:opendata-vector binary in the current directory.
Configure Vector
Create a file calledvector.yaml with the following contents:
vector.yaml
- 2 dimensions — each vector has two
f32components. - L2 distance — Euclidean distance, where lower scores mean higher similarity.
- One indexed field — a
labelstring field you can filter on during search.
Start the server
Run the binary with the configuration file you just created:Upsert records
Insert three records with 2-dimensional vectors. Requests use theapplication/protobuf+json content type:
Search for nearest neighbors
Search for the 2 closest vectors to[0.0, 0.9] — a point near “north”:
north is closest because [0.0, 1.0] is only 0.1 away from the query
[0.0, 0.9] in Euclidean distance (score = 0.01 = 0.1²).
Fetch a record by ID
Retrieve a specific record using its ID:Next steps
- To try a more realistic quickstart that indexes a large set of documents using a real embedding model, see the example on GitHub.
- Understand how records are structured in Data Model.
- Learn how the vector index works in Storage Design.
- Browse the full REST API in the API reference section in the sidebar.