From cfc3ea531cf70f41ba073b2bb3f6804366dbd4de Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 27 Oct 2026 09:25:30 +0800 Subject: [PATCH] test(rust): use exact vector index in RTE geo test --- rust/lancedb/src/query.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rust/lancedb/src/query.rs b/rust/lancedb/src/query.rs index f30870fb1..dc3356b16 100644 --- a/rust/lancedb/src/query.rs +++ b/rust/lancedb/src/query.rs @@ -3361,13 +3361,18 @@ mod tests { #[cfg(feature = "geo")] #[tokio::test] async fn test_st_dwithin_filter_on_rte_base_and_active_memtable() { - use crate::index::vector::IvfPqIndexBuilder; + use crate::index::vector::IvfFlatIndexBuilder; let tmp_dir = tempdir().unwrap(); let table = make_geo_query_table(&tmp_dir).await; table.set_unenforced_primary_key(["id"]).await.unwrap(); table - .create_index(&["vector"], Index::IvfPq(IvfPqIndexBuilder::default())) + .create_index( + &["vector"], + // Keep this three-row fixture exact so the assertions exercise + // filter routing rather than ANN recall. + Index::IvfFlat(IvfFlatIndexBuilder::default().num_partitions(1)), + ) .execute() .await .unwrap();