From 8caba26c312ee8eff5e82c2ff8317d119949b293 Mon Sep 17 00:00:00 2001 From: Ivan Pleshkov Date: Thu, 27 Apr 2023 18:44:09 +0300 Subject: [PATCH] Revert hnsw m min value validation (#1797) * revert hnsw m min value * grpc goo * update openapi --- docs/redoc/master/openapi.json | 3 +-- lib/api/build.rs | 1 - lib/api/src/grpc/qdrant.rs | 1 - lib/segment/src/types.rs | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/redoc/master/openapi.json b/docs/redoc/master/openapi.json index 7d6c09455b..4cd50baf6e 100644 --- a/docs/redoc/master/openapi.json +++ b/docs/redoc/master/openapi.json @@ -3968,8 +3968,7 @@ "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", "type": "integer", "format": "uint", - "maximum": 10000, - "minimum": 4 + "minimum": 0 }, "ef_construct": { "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", diff --git a/lib/api/build.rs b/lib/api/build.rs index 4e0bc40844..b61171c733 100644 --- a/lib/api/build.rs +++ b/lib/api/build.rs @@ -93,7 +93,6 @@ fn configure_validation(builder: Builder) -> Builder { ("DeleteCollection.timeout", "custom = \"crate::grpc::validate::validate_u64_range_min_1\""), ("ChangeAliases.timeout", "custom = \"crate::grpc::validate::validate_u64_range_min_1\""), ("ListCollectionAliasesRequest.collection_name", "length(min = 1, max = 255)"), - ("HnswConfigDiff.m", "custom = \"crate::grpc::validate::validate_u64_range_min_4_max_10000\""), ("HnswConfigDiff.ef_construct", "custom = \"crate::grpc::validate::validate_u64_range_min_4\""), ("WalConfigDiff.wal_capacity_mb", "custom = \"crate::grpc::validate::validate_u64_range_min_1\""), ("OptimizersConfigDiff.deleted_threshold", "custom = \"crate::grpc::validate::validate_f64_range_1\""), diff --git a/lib/api/src/grpc/qdrant.rs b/lib/api/src/grpc/qdrant.rs index 968a3ffc8f..4b95adc974 100644 --- a/lib/api/src/grpc/qdrant.rs +++ b/lib/api/src/grpc/qdrant.rs @@ -96,7 +96,6 @@ pub struct HnswConfigDiff { /// /// Number of edges per node in the index graph. Larger the value - more accurate the search, more space required. #[prost(uint64, optional, tag = "1")] - #[validate(custom = "crate::grpc::validate::validate_u64_range_min_4_max_10000")] pub m: ::core::option::Option, /// /// Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index. diff --git a/lib/segment/src/types.rs b/lib/segment/src/types.rs index fbace3b36f..65d227cf4b 100644 --- a/lib/segment/src/types.rs +++ b/lib/segment/src/types.rs @@ -312,7 +312,6 @@ pub enum Indexes { #[serde(rename_all = "snake_case")] pub struct HnswConfig { /// Number of edges per node in the index graph. Larger the value - more accurate the search, more space required. - #[validate(range(min = 4, max = 10_000))] pub m: usize, /// Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index. #[validate(range(min = 4))]