Build the index and query with the same metric: l2, cosine, or dot (hamming is IVF_FLAT only). If you omit the metric, current SDKs inherit the index metric, but on older SDK versions set it explicitly to match. If a Cloud search gets rejected by the KNN safety limit, check for a metric mismatch before anything else.

Context: Official docs (vector search): documents the gotcha that a LanceDB vector search must use the same distance metric the index was built with. Request a different metric and LanceDB cannot use the index, falling back to an exhaustive brute-force search. On LanceDB Cloud the brute-force KNN safety limit can reject that search outright on a large table. Older SDKs also sent l2 when the metric was omitted, silently mismatching non-l2 indexes.