fix: disallow brute force on index unless explicitly requested#6105
fix: disallow brute force on index unless explicitly requested#6105westonpace wants to merge 1 commit intolance-format:mainfrom
Conversation
Review of PR #6105The behavioral change (error instead of silent brute force) is well-motivated and the test coverage is good. Two minor issues: P1: Dead code after early returnAfter the change, the P1: Test name is stale
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
this seems like a significant behavior change, since any clients previously doing the "wrong" thing but still getting results will now get errors |
wjones127
left a comment
There was a problem hiding this comment.
I think this change is reasonable, but it should definitely be labelled as a breaking change.
Currently an attempt to search an index with a distance type that does not match the trained distance type will result in a brute force search (with a warning logged). However, this should be an error. An implicit brute force search can be a very costly thing. We already have a way to request a brute force search (use_index=False) and that should be used if this is truly the behavior that is desired.