From c64288377be2a2c4f265edad90a5a8af92a5e49d Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 10 Aug 2023 21:11:10 -0700 Subject: [PATCH] Updated min ef_construction to 4 [skip ci] --- src/hnsw.h | 2 +- test/expected/hnsw_options.out | 8 ++++---- test/sql/hnsw_options.sql | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hnsw.h b/src/hnsw.h index 53cc889..a3f1d0b 100644 --- a/src/hnsw.h +++ b/src/hnsw.h @@ -32,7 +32,7 @@ #define HNSW_MIN_M 2 #define HNSW_MAX_M 100 #define HNSW_DEFAULT_EF_CONSTRUCTION 40 -#define HNSW_MIN_EF_CONSTRUCTION 10 +#define HNSW_MIN_EF_CONSTRUCTION 4 #define HNSW_MAX_EF_CONSTRUCTION 1000 #define HNSW_DEFAULT_EF_SEARCH 40 #define HNSW_MIN_EF_SEARCH 1 diff --git a/test/expected/hnsw_options.out b/test/expected/hnsw_options.out index 1a07fef..fe1e865 100644 --- a/test/expected/hnsw_options.out +++ b/test/expected/hnsw_options.out @@ -6,12 +6,12 @@ DETAIL: Valid values are between "2" and "100". CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 101); ERROR: value 101 out of bounds for option "m" DETAIL: Valid values are between "2" and "100". -CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 9); -ERROR: value 9 out of bounds for option "ef_construction" -DETAIL: Valid values are between "10" and "1000". +CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 3); +ERROR: value 3 out of bounds for option "ef_construction" +DETAIL: Valid values are between "4" and "1000". CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 1001); ERROR: value 1001 out of bounds for option "ef_construction" -DETAIL: Valid values are between "10" and "1000". +DETAIL: Valid values are between "4" and "1000". CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 16, ef_construction = 31); ERROR: ef_construction must be greater than or equal to 2 * m SHOW hnsw.ef_search; diff --git a/test/sql/hnsw_options.sql b/test/sql/hnsw_options.sql index 845921d..a6040ff 100644 --- a/test/sql/hnsw_options.sql +++ b/test/sql/hnsw_options.sql @@ -3,7 +3,7 @@ SET enable_seqscan = off; CREATE TABLE t (val vector(3)); CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 1); CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 101); -CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 9); +CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 3); CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (ef_construction = 1001); CREATE INDEX ON t USING hnsw (val vector_l2_ops) WITH (m = 16, ef_construction = 31);