From 487997f6ad94549e87e1f1cc6573dab1ed73b68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 9 Jul 2024 11:15:57 +0200 Subject: [PATCH] Support the new `editDocumentsByFunction` experimental feature --- meilisearch/tests/documents/get_documents.rs | 3 ++- meilisearch/tests/dumps/mod.rs | 9 ++++++--- meilisearch/tests/features/mod.rs | 20 +++++++++++++------- meilisearch/tests/search/hybrid.rs | 6 ++++-- meilisearch/tests/settings/get_settings.rs | 3 ++- meilisearch/tests/similar/mod.rs | 12 ++++++++---- meilisearch/tests/vector/mod.rs | 9 ++++++--- meilisearch/tests/vector/settings.rs | 3 ++- 8 files changed, 43 insertions(+), 22 deletions(-) diff --git a/meilisearch/tests/documents/get_documents.rs b/meilisearch/tests/documents/get_documents.rs index 68065b019..f32adf48d 100644 --- a/meilisearch/tests/documents/get_documents.rs +++ b/meilisearch/tests/documents/get_documents.rs @@ -535,7 +535,8 @@ async fn get_document_with_vectors() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/dumps/mod.rs b/meilisearch/tests/dumps/mod.rs index fa402cb41..8c53e661b 100644 --- a/meilisearch/tests/dumps/mod.rs +++ b/meilisearch/tests/dumps/mod.rs @@ -1859,7 +1859,8 @@ async fn import_dump_v6_containing_experimental_features() { { "vectorStore": false, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -1952,7 +1953,8 @@ async fn generate_and_import_dump_containing_vectors() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); let index = server.index("pets"); @@ -2022,7 +2024,8 @@ async fn generate_and_import_dump_containing_vectors() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/features/mod.rs b/meilisearch/tests/features/mod.rs index 9548567ff..b90e455c5 100644 --- a/meilisearch/tests/features/mod.rs +++ b/meilisearch/tests/features/mod.rs @@ -20,7 +20,8 @@ async fn experimental_features() { { "vectorStore": false, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -31,7 +32,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -42,7 +44,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -54,7 +57,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -66,7 +70,8 @@ async fn experimental_features() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); } @@ -85,7 +90,8 @@ async fn experimental_feature_metrics() { { "vectorStore": false, "metrics": true, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -140,7 +146,7 @@ async fn errors() { meili_snap::snapshot!(code, @"400 Bad Request"); meili_snap::snapshot!(meili_snap::json_string!(response), @r###" { - "message": "Unknown field `NotAFeature`: expected one of `vectorStore`, `metrics`, `logsRoute`", + "message": "Unknown field `NotAFeature`: expected one of `vectorStore`, `metrics`, `logsRoute`, `editDocumentsByFunction`", "code": "bad_request", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#bad_request" diff --git a/meilisearch/tests/search/hybrid.rs b/meilisearch/tests/search/hybrid.rs index 02768bf60..1a4e8baab 100644 --- a/meilisearch/tests/search/hybrid.rs +++ b/meilisearch/tests/search/hybrid.rs @@ -18,7 +18,8 @@ async fn index_with_documents_user_provided<'a>( { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -46,7 +47,8 @@ async fn index_with_documents_hf<'a>(server: &'a Server, documents: &Value) -> I { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/settings/get_settings.rs b/meilisearch/tests/settings/get_settings.rs index 379e0a917..d1fe71140 100644 --- a/meilisearch/tests/settings/get_settings.rs +++ b/meilisearch/tests/settings/get_settings.rs @@ -98,7 +98,8 @@ async fn secrets_are_hidden_in_settings() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/similar/mod.rs b/meilisearch/tests/similar/mod.rs index 60a0203ed..edfecf83c 100644 --- a/meilisearch/tests/similar/mod.rs +++ b/meilisearch/tests/similar/mod.rs @@ -55,7 +55,8 @@ async fn basic() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -244,7 +245,8 @@ async fn ranking_score_threshold() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -523,7 +525,8 @@ async fn filter() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -650,7 +653,8 @@ async fn limit_and_offset() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/vector/mod.rs b/meilisearch/tests/vector/mod.rs index 0343ab785..21b643c20 100644 --- a/meilisearch/tests/vector/mod.rs +++ b/meilisearch/tests/vector/mod.rs @@ -16,7 +16,8 @@ async fn add_remove_user_provided() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -159,7 +160,8 @@ async fn generate_default_user_provided_documents(server: &Server) -> Index { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); @@ -516,7 +518,8 @@ async fn add_remove_one_vector_4588() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###); diff --git a/meilisearch/tests/vector/settings.rs b/meilisearch/tests/vector/settings.rs index e53ceb383..177e070cd 100644 --- a/meilisearch/tests/vector/settings.rs +++ b/meilisearch/tests/vector/settings.rs @@ -14,7 +14,8 @@ async fn update_embedder() { { "vectorStore": true, "metrics": false, - "logsRoute": false + "logsRoute": false, + "editDocumentsByFunction": false } "###);