Revert hnsw m min value validation (#1797)

* revert hnsw m min value

* grpc goo

* update openapi
This commit is contained in:
Ivan Pleshkov
2023-04-27 18:44:09 +03:00
committed by Andrey Vasnetsov
parent 9fa5bd8893
commit 8caba26c31
4 changed files with 1 additions and 5 deletions

View File

@@ -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.",

View File

@@ -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\""),

View File

@@ -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<u64>,
///
/// Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.

View File

@@ -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))]