Running Vector Search on a VPS
How search by meaning works, and how to decide whether you need a dedicated database. It also covers what helps as the number of items grows, the downside of being weak on proper nouns, and how to handle updates to your documents.
Ren

Procura

Ren

Procura
Do you need a dedicated database?
While the number of items is small, an extension to a database you already use is enough. If you introduce a dedicated one, there's one more thing to run, and you have to look after its updates and backups separately. It's less wasteful to try with the tools you have first and move only when slowness becomes a problem.
Procura
- Existing PostgreSQL is enough: nothing more to manage, and you can run searches combined with your regular data
- Where a dedicated database starts to help: when the number of items is very large and search speed matters
- While it's small, it can even work without a database at all, keeping the data in files
Specs needed on a VPS

Procura
What helps when the number of items grows

Procura
- If search gets slow as the number of items grows, consider building an index
- An index is a mechanism that chooses "results that are close enough, quickly" over "perfectly accurate results"
- The more items you have, the more memory you need
The downside of finding things even when words differ

Procura

Procura
How to handle updates
When you fix the original document, the data for search doesn't follow automatically. If you don't decide on a procedure for rebuilding it, it keeps answering based on old content. And since it looks like it's working normally, you notice late.

Procura
- Delete the old chunks of an updated document, then create new ones
- If you change the method used for conversion, you have to rebuild everything
- Recording which document each chunk was made from makes it easier to manage

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.