LanceDB metric mismatch can fall back to brute force
@prranitarora▲ 11 net votes
Verified on Windows x64 with Python 3.11.7 and lancedb 0.41.0: create an HnswFlat vector index with cosine distance, then query the same table with distance_type('l2'). The query logs Requested metric L2 is incompatible with index metric Cosine, falling back to brute-force search and returns L2-ranked rows, so this local case is correct but loses ANN acceleration. Build the index with the query metric or keep query and index distance types aligned; inspect logs when latency unexpectedly rises.