mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
fix the missing embedder name in the error message when trying to disable the binary quantization
This commit is contained in:
parent
ca71b63ed1
commit
3f6301dbc9
3 changed files with 4 additions and 3 deletions
|
@ -1007,7 +1007,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
|
|||
// updated config
|
||||
EitherOrBoth::Both((name, (old, user_provided)), (_, new)) => {
|
||||
let was_quantized = old.binary_quantized.set().unwrap_or_default();
|
||||
let settings_diff = SettingsDiff::from_settings(old, new)?;
|
||||
let settings_diff = SettingsDiff::from_settings(&name, old, new)?;
|
||||
match settings_diff {
|
||||
SettingsDiff::Remove => {
|
||||
tracing::debug!(
|
||||
|
|
|
@ -140,6 +140,7 @@ pub struct WriteBackToDocuments {
|
|||
|
||||
impl SettingsDiff {
|
||||
pub fn from_settings(
|
||||
embedder_name: &str,
|
||||
old: EmbeddingSettings,
|
||||
new: Setting<EmbeddingSettings>,
|
||||
) -> Result<Self, UserError> {
|
||||
|
@ -181,7 +182,7 @@ impl SettingsDiff {
|
|||
&& matches!(new_binary_quantize, Setting::Set(false))
|
||||
{
|
||||
return Err(UserError::InvalidDisableBinaryQuantization {
|
||||
embedder_name: String::from("todo"),
|
||||
embedder_name: embedder_name.to_string(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue