Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: checking of user options #297

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/service/src/algorithms/quantization/product.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use validator::Validate;
#[serde(deny_unknown_fields)]
pub struct ProductQuantizationOptions {
#[serde(default = "ProductQuantizationOptions::default_sample")]
#[validate(range(min = 1, max = 1_000_000))]
pub sample: u32,
#[serde(default)]
pub ratio: ProductQuantizationOptionsRatio,
Expand Down
4 changes: 2 additions & 2 deletions crates/service/src/index/optimizing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use validator::Validate;
#[serde(deny_unknown_fields)]
pub struct OptimizingOptions {
#[serde(default = "OptimizingOptions::default_sealing_secs")]
#[validate(range(min = 0, max = 60))]
#[validate(range(min = 1, max = 60))]
pub sealing_secs: u64,
#[serde(default = "OptimizingOptions::default_sealing_size")]
#[validate(range(min = 1, max = 4_000_000_000))]
Expand All @@ -18,7 +18,7 @@ pub struct OptimizingOptions {
#[validate(range(min = 0.01, max = 1.00))]
pub deleted_threshold: f64,
#[serde(default = "OptimizingOptions::default_optimizing_threads")]
#[validate(range(min = 0, max = 65535))]
#[validate(range(min = 1, max = 65535))]
pub optimizing_threads: usize,
}

Expand Down
2 changes: 1 addition & 1 deletion src/gucs/executing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static HNSW_EF_SEARCH: GucSetting<i32> = GucSetting::<i32>::new(100);
pub unsafe fn init() {
GucRegistry::define_bool_guc(
"vectors.enable_prefilter",
"Enables or disables the prfiltering.",
"Enables or disables the prefiltering.",
"https://docs.pgvecto.rs/usage/search.html",
&ENABLE_PREFILTER,
GucContext::Userset,
Expand Down
Loading