mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Make composite embedders experimental
This commit is contained in:
parent
9a282be0a2
commit
54ee81bb09
4 changed files with 50 additions and 1 deletions
|
@ -52,6 +52,7 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
|
|||
contains_filter: Some(false),
|
||||
network: Some(false),
|
||||
get_task_documents_route: Some(false),
|
||||
composite_embedders: Some(false),
|
||||
})),
|
||||
(status = 401, description = "The authorization header is missing", body = ResponseError, content_type = "application/json", example = json!(
|
||||
{
|
||||
|
@ -94,6 +95,8 @@ pub struct RuntimeTogglableFeatures {
|
|||
pub network: Option<bool>,
|
||||
#[deserr(default)]
|
||||
pub get_task_documents_route: Option<bool>,
|
||||
#[deserr(default)]
|
||||
pub composite_embedders: Option<bool>,
|
||||
}
|
||||
|
||||
impl From<meilisearch_types::features::RuntimeTogglableFeatures> for RuntimeTogglableFeatures {
|
||||
|
@ -105,6 +108,7 @@ impl From<meilisearch_types::features::RuntimeTogglableFeatures> for RuntimeTogg
|
|||
contains_filter,
|
||||
network,
|
||||
get_task_documents_route,
|
||||
composite_embedders,
|
||||
} = value;
|
||||
|
||||
Self {
|
||||
|
@ -114,6 +118,7 @@ impl From<meilisearch_types::features::RuntimeTogglableFeatures> for RuntimeTogg
|
|||
contains_filter: Some(contains_filter),
|
||||
network: Some(network),
|
||||
get_task_documents_route: Some(get_task_documents_route),
|
||||
composite_embedders: Some(composite_embedders),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +207,10 @@ async fn patch_features(
|
|||
.0
|
||||
.get_task_documents_route
|
||||
.unwrap_or(old_features.get_task_documents_route),
|
||||
composite_embedders: new_features
|
||||
.0
|
||||
.composite_embedders
|
||||
.unwrap_or(old_features.composite_embedders),
|
||||
};
|
||||
|
||||
// explicitly destructure for analytics rather than using the `Serialize` implementation, because
|
||||
|
@ -214,6 +223,7 @@ async fn patch_features(
|
|||
contains_filter,
|
||||
network,
|
||||
get_task_documents_route,
|
||||
composite_embedders,
|
||||
} = new_features;
|
||||
|
||||
analytics.publish(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue