[question] Do I need to recreate the vec table after changing distance_metric
The default distance_metric is l2_distance which is not the one using for embedding. I need to change it to distance_metric=cosine.
How to migrate this change and minimize the impact? Can I save the existing vector data?
I'm in the same boat. I think we/you could just create a new table with the other distance metric, do a insert into new_table select * from old_table, and it's good? I'm going to try this.
I think that may work, as long as the old table isn't dropped and the new one renamed. I'm getting an SQL logic error in that case. Maybe renaming on virtual tables isn't supported?
https://github.com/asg017/sqlite-vec/issues/125
And there is also other issues I encountered: https://github.com/asg017/sqlite-vec/issues/154
Relatedly, how do I change the distance metric to cosine using python? Do I need to recompile the .so somehow?