mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
Fix bug
This commit is contained in:
@ -101,6 +101,10 @@ impl<T> Setting<T> {
|
|||||||
matches!(self, Self::NotSet)
|
matches!(self, Self::NotSet)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const fn is_reset(&self) -> bool {
|
||||||
|
matches!(self, Self::Reset)
|
||||||
|
}
|
||||||
|
|
||||||
/// If `Self` is `Reset`, then map self to `Set` with the provided `val`.
|
/// If `Self` is `Reset`, then map self to `Set` with the provided `val`.
|
||||||
pub fn or_reset(self, val: T) -> Self {
|
pub fn or_reset(self, val: T) -> Self {
|
||||||
match self {
|
match self {
|
||||||
@ -1213,6 +1217,10 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
|
|||||||
// new config
|
// new config
|
||||||
EitherOrBoth::Right((name, mut setting)) => {
|
EitherOrBoth::Right((name, mut setting)) => {
|
||||||
tracing::debug!(embedder = name, "new embedder");
|
tracing::debug!(embedder = name, "new embedder");
|
||||||
|
// if we are asked to reset an embedder that doesn't exist, just ignore it
|
||||||
|
if setting.is_reset() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// apply the default source in case the source was not set so that it gets validated
|
// apply the default source in case the source was not set so that it gets validated
|
||||||
crate::vector::settings::EmbeddingSettings::apply_default_source(&mut setting);
|
crate::vector::settings::EmbeddingSettings::apply_default_source(&mut setting);
|
||||||
crate::vector::settings::EmbeddingSettings::apply_default_openai_model(
|
crate::vector::settings::EmbeddingSettings::apply_default_openai_model(
|
||||||
|
Reference in New Issue
Block a user