← Changelog
NewApps

An index for vector search

A vector field can now be declared in a model's indexes, as { fields: ["embedding"] }. It's built in the background like the other indexes, and once it's ready a nearest search walks it (HNSW) instead of comparing the query with every vector, so search stays fast past a few hundred thousand records. Filters still apply and still fill the page. The field needs dimensions, unless it's embedded from a source with an OpenAI model.

A nearest search that runs out of time now says to declare a vector index, rather than an index that couldn't be declared for vectors.

More in Vector search.