diff --git a/meilisearch/tests/search/hybrid.rs b/meilisearch/tests/search/hybrid.rs index fb6fe297f..77a29d4a3 100644 --- a/meilisearch/tests/search/hybrid.rs +++ b/meilisearch/tests/search/hybrid.rs @@ -21,9 +21,9 @@ async fn index_with_documents<'a>(server: &'a Server, documents: &Value) -> Inde "###); let (response, code) = index - .update_settings( - json!({ "embedders": {"default": {"source": {"userProvided": {"dimensions": 2}}}} }), - ) + .update_settings(json!({ "embedders": {"default": { + "source": "userProvided", + "dimensions": 2}}} )) .await; assert_eq!(202, code, "{:?}", response); index.wait_task(response.uid()).await; diff --git a/meilisearch/tests/search/mod.rs b/meilisearch/tests/search/mod.rs index 133a143fd..9b7b01029 100644 --- a/meilisearch/tests/search/mod.rs +++ b/meilisearch/tests/search/mod.rs @@ -890,13 +890,21 @@ async fn experimental_feature_vector_store() { let (response, code) = index .update_settings(json!({"embedders": { "manual": { - "source": { - "userProvided": {"dimensions": 3} - } + "source": "userProvided", + "dimensions": 3, } }})) .await; + meili_snap::snapshot!(response, @r###" + { + "taskUid": 1, + "indexUid": "test", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "[date]" + } + "###); meili_snap::snapshot!(code, @"202 Accepted"); let response = index.wait_task(response.uid()).await; diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index ffc3f6b3a..738cfeb38 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -2553,7 +2553,7 @@ mod tests { /// Vectors must be of the same length. #[test] fn test_multiple_vectors() { - use crate::vector::settings::{EmbedderSettings, EmbeddingSettings}; + use crate::vector::settings::EmbeddingSettings; let index = TempIndex::new(); index @@ -2562,9 +2562,11 @@ mod tests { embedders.insert( "manual".to_string(), Setting::Set(EmbeddingSettings { - embedder_options: Setting::Set(EmbedderSettings::UserProvided( - crate::vector::settings::UserProvidedSettings { dimensions: 3 }, - )), + source: Setting::Set(crate::vector::settings::EmbedderSource::UserProvided), + model: Setting::NotSet, + revision: Setting::NotSet, + api_key: Setting::NotSet, + dimensions: Setting::Set(3), document_template: Setting::NotSet, }), ); @@ -2579,10 +2581,10 @@ mod tests { .unwrap(); index.add_documents(documents!([{"id": 1, "_vectors": { "manual": [6, 7, 8] }}])).unwrap(); index - .add_documents( - documents!([{"id": 2, "_vectors": { "manual": [[9, 10, 11], [12, 13, 14], [15, 16, 17]] }}]), - ) - .unwrap(); + .add_documents( + documents!([{"id": 2, "_vectors": { "manual": [[9, 10, 11], [12, 13, 14], [15, 16, 17]] }}]), + ) + .unwrap(); let rtxn = index.read_txn().unwrap(); let res = index.search(&rtxn).vector([0.0, 1.0, 2.0].to_vec()).execute().unwrap();