mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-09 11:14:20 +01:00
This PR implements more sophisticated algorithm in the toy vector sparse index: now we enumerate components based on the frequency (in order to check unpopular "features" first) and also estimate length threshold which can give us better results compared with current top-k set. Also, this PR adds optional `delta` parameter which can enable approximate search which will return results with score not more than `delta` away from the optimal. In order to implement this index method - index code were slightly adjusted in order to allow to store some non-key payload in the index rows. So, now index can hold N columns where first K <= N columns will be used as identity (before that K always was equal to N). Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3862
Integration and regression test suite.
# run all tests
cargo test
# run individual test
cargo test test_sequential_write -- --nocapture