mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-19 01:18:31 +08:00
Add --experimental-disable-vector-store
CLI flag
This commit is contained in:
parent
d78951feb7
commit
29eeb84ce3
@ -105,12 +105,17 @@ impl FeatureData {
|
|||||||
let txn = env.read_txn()?;
|
let txn = env.read_txn()?;
|
||||||
let persisted_features: RuntimeTogglableFeatures =
|
let persisted_features: RuntimeTogglableFeatures =
|
||||||
runtime_features_db.get(&txn, EXPERIMENTAL_FEATURES)?.unwrap_or_default();
|
runtime_features_db.get(&txn, EXPERIMENTAL_FEATURES)?.unwrap_or_default();
|
||||||
let InstanceTogglableFeatures { metrics, logs_route, contains_filter } = instance_features;
|
let InstanceTogglableFeatures {
|
||||||
|
metrics,
|
||||||
|
logs_route,
|
||||||
|
contains_filter,
|
||||||
|
disable_vector_store,
|
||||||
|
} = instance_features;
|
||||||
let runtime = Arc::new(RwLock::new(RuntimeTogglableFeatures {
|
let runtime = Arc::new(RwLock::new(RuntimeTogglableFeatures {
|
||||||
metrics: metrics || persisted_features.metrics,
|
metrics: metrics || persisted_features.metrics,
|
||||||
logs_route: logs_route || persisted_features.logs_route,
|
logs_route: logs_route || persisted_features.logs_route,
|
||||||
contains_filter: contains_filter || persisted_features.contains_filter,
|
contains_filter: contains_filter || persisted_features.contains_filter,
|
||||||
vector_store: true,
|
vector_store: !disable_vector_store,
|
||||||
..persisted_features
|
..persisted_features
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -15,4 +15,5 @@ pub struct InstanceTogglableFeatures {
|
|||||||
pub metrics: bool,
|
pub metrics: bool,
|
||||||
pub logs_route: bool,
|
pub logs_route: bool,
|
||||||
pub contains_filter: bool,
|
pub contains_filter: bool,
|
||||||
|
pub disable_vector_store: bool,
|
||||||
}
|
}
|
||||||
|
@ -269,6 +269,7 @@ impl Infos {
|
|||||||
indexer_options,
|
indexer_options,
|
||||||
config_file_path,
|
config_file_path,
|
||||||
no_analytics: _,
|
no_analytics: _,
|
||||||
|
experimental_disable_vector_store,
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
let schedule_snapshot = match schedule_snapshot {
|
let schedule_snapshot = match schedule_snapshot {
|
||||||
@ -280,7 +281,7 @@ impl Infos {
|
|||||||
indexer_options;
|
indexer_options;
|
||||||
|
|
||||||
let RuntimeTogglableFeatures {
|
let RuntimeTogglableFeatures {
|
||||||
vector_store,
|
vector_store: _,
|
||||||
metrics,
|
metrics,
|
||||||
logs_route,
|
logs_route,
|
||||||
edit_documents_by_function,
|
edit_documents_by_function,
|
||||||
@ -292,7 +293,7 @@ impl Infos {
|
|||||||
Self {
|
Self {
|
||||||
env,
|
env,
|
||||||
experimental_contains_filter: experimental_contains_filter | contains_filter,
|
experimental_contains_filter: experimental_contains_filter | contains_filter,
|
||||||
experimental_vector_store: vector_store,
|
experimental_vector_store: !experimental_disable_vector_store,
|
||||||
experimental_edit_documents_by_function: edit_documents_by_function,
|
experimental_edit_documents_by_function: edit_documents_by_function,
|
||||||
experimental_enable_metrics: experimental_enable_metrics | metrics,
|
experimental_enable_metrics: experimental_enable_metrics | metrics,
|
||||||
experimental_search_queue_size,
|
experimental_search_queue_size,
|
||||||
|
@ -52,6 +52,7 @@ const MEILI_EXPERIMENTAL_LOGS_MODE: &str = "MEILI_EXPERIMENTAL_LOGS_MODE";
|
|||||||
const MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS: &str = "MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS";
|
const MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS: &str = "MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS";
|
||||||
const MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE: &str = "MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE";
|
const MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE: &str = "MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE";
|
||||||
const MEILI_EXPERIMENTAL_CONTAINS_FILTER: &str = "MEILI_EXPERIMENTAL_CONTAINS_FILTER";
|
const MEILI_EXPERIMENTAL_CONTAINS_FILTER: &str = "MEILI_EXPERIMENTAL_CONTAINS_FILTER";
|
||||||
|
const MEILI_EXPERIMENTAL_DISABLE_VECTOR_STORE: &str = "MEILI_EXPERIMENTAL_DISABLE_VECTOR_STORE";
|
||||||
const MEILI_EXPERIMENTAL_ENABLE_METRICS: &str = "MEILI_EXPERIMENTAL_ENABLE_METRICS";
|
const MEILI_EXPERIMENTAL_ENABLE_METRICS: &str = "MEILI_EXPERIMENTAL_ENABLE_METRICS";
|
||||||
const MEILI_EXPERIMENTAL_SEARCH_QUEUE_SIZE: &str = "MEILI_EXPERIMENTAL_SEARCH_QUEUE_SIZE";
|
const MEILI_EXPERIMENTAL_SEARCH_QUEUE_SIZE: &str = "MEILI_EXPERIMENTAL_SEARCH_QUEUE_SIZE";
|
||||||
const MEILI_EXPERIMENTAL_DROP_SEARCH_AFTER: &str = "MEILI_EXPERIMENTAL_DROP_SEARCH_AFTER";
|
const MEILI_EXPERIMENTAL_DROP_SEARCH_AFTER: &str = "MEILI_EXPERIMENTAL_DROP_SEARCH_AFTER";
|
||||||
@ -360,6 +361,14 @@ pub struct Opt {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub experimental_enable_metrics: bool,
|
pub experimental_enable_metrics: bool,
|
||||||
|
|
||||||
|
/// Experimental disabling of the vector store feature. For more information,
|
||||||
|
/// see: <https://www.notion.so/meilisearch/v1-13-AI-search-changes-17a4b06b651f80538b65d31724545def#17a4b06b651f80319796d3e7dbaa57c5>
|
||||||
|
///
|
||||||
|
/// If set, disables embedder configuration, hybrid search, semantic search and similar requests.
|
||||||
|
#[clap(long, env = MEILI_EXPERIMENTAL_DISABLE_VECTOR_STORE)]
|
||||||
|
#[serde(default)]
|
||||||
|
pub experimental_disable_vector_store: bool,
|
||||||
|
|
||||||
/// Experimental search queue size. For more information,
|
/// Experimental search queue size. For more information,
|
||||||
/// see: <https://github.com/orgs/meilisearch/discussions/729>
|
/// see: <https://github.com/orgs/meilisearch/discussions/729>
|
||||||
///
|
///
|
||||||
@ -540,6 +549,7 @@ impl Opt {
|
|||||||
experimental_reduce_indexing_memory_usage,
|
experimental_reduce_indexing_memory_usage,
|
||||||
experimental_max_number_of_batched_tasks,
|
experimental_max_number_of_batched_tasks,
|
||||||
experimental_limit_batched_tasks_total_size,
|
experimental_limit_batched_tasks_total_size,
|
||||||
|
experimental_disable_vector_store,
|
||||||
} = self;
|
} = self;
|
||||||
export_to_env_if_not_present(MEILI_DB_PATH, db_path);
|
export_to_env_if_not_present(MEILI_DB_PATH, db_path);
|
||||||
export_to_env_if_not_present(MEILI_HTTP_ADDR, http_addr);
|
export_to_env_if_not_present(MEILI_HTTP_ADDR, http_addr);
|
||||||
@ -588,6 +598,10 @@ impl Opt {
|
|||||||
MEILI_EXPERIMENTAL_CONTAINS_FILTER,
|
MEILI_EXPERIMENTAL_CONTAINS_FILTER,
|
||||||
experimental_contains_filter.to_string(),
|
experimental_contains_filter.to_string(),
|
||||||
);
|
);
|
||||||
|
export_to_env_if_not_present(
|
||||||
|
MEILI_EXPERIMENTAL_DISABLE_VECTOR_STORE,
|
||||||
|
experimental_disable_vector_store.to_string(),
|
||||||
|
);
|
||||||
export_to_env_if_not_present(
|
export_to_env_if_not_present(
|
||||||
MEILI_EXPERIMENTAL_ENABLE_METRICS,
|
MEILI_EXPERIMENTAL_ENABLE_METRICS,
|
||||||
experimental_enable_metrics.to_string(),
|
experimental_enable_metrics.to_string(),
|
||||||
@ -680,6 +694,7 @@ impl Opt {
|
|||||||
metrics: self.experimental_enable_metrics,
|
metrics: self.experimental_enable_metrics,
|
||||||
logs_route: self.experimental_enable_logs_route,
|
logs_route: self.experimental_enable_logs_route,
|
||||||
contains_filter: self.experimental_contains_filter,
|
contains_filter: self.experimental_contains_filter,
|
||||||
|
disable_vector_store: self.experimental_disable_vector_store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user