whatevermom 6 days ago

Why embed Redis ? What feature do you need from Redis so bad that you need to embed it? Maybe you could just use Rust and have something performant without adding complexity?

2
correa_brian 6 days ago

Their vector search modules are the reason I embedded it. I tried sqlite and wasn't getting good search results with the vss extension. Maybe I wasn't configuring it correctly. Redis was just better than the alternatives (qdrant, sqlite, duckdb with vector search).

nemothekid 6 days ago

Are you using Flat indexes? If so they should return the same results provided you are using the same distance function. If you aren't using Flat indexes, there might be more setup, but I'd recommend just using Flat indexes. They are plenty fast on most systems for searching ~1 million vectors (assuming 1024-32 bit float vectors).

If you aren't doing anything crazy you could probably just get away with storing them all in a memory mapped file.

zdrummond 6 days ago

I would love to understand this in more depth. Any chance you could write up what you found?

twen_ty 6 days ago

Or alternatively, why would SQLite be not as performant as Redis in embedded context?

correa_brian 6 days ago

I just wasn't able to get the similarity results to match redis. Probably my own error, but that's why I opted for it instead of SQLite. We'll revisit at some point.