Support the new editDocumentsByFunction experimental feature

This commit is contained in:
Clément Renault 2024-07-09 11:15:57 +02:00
parent 94809090a3
commit 487997f6ad
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
8 changed files with 43 additions and 22 deletions

View File

@ -535,7 +535,8 @@ async fn get_document_with_vectors() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);

View File

@ -1859,7 +1859,8 @@ async fn import_dump_v6_containing_experimental_features() {
{ {
"vectorStore": false, "vectorStore": false,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -1952,7 +1953,8 @@ async fn generate_and_import_dump_containing_vectors() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
let index = server.index("pets"); let index = server.index("pets");
@ -2022,7 +2024,8 @@ async fn generate_and_import_dump_containing_vectors() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);

View File

@ -20,7 +20,8 @@ async fn experimental_features() {
{ {
"vectorStore": false, "vectorStore": false,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -31,7 +32,8 @@ async fn experimental_features() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -42,7 +44,8 @@ async fn experimental_features() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -54,7 +57,8 @@ async fn experimental_features() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -66,7 +70,8 @@ async fn experimental_features() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
} }
@ -85,7 +90,8 @@ async fn experimental_feature_metrics() {
{ {
"vectorStore": false, "vectorStore": false,
"metrics": true, "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!(code, @"400 Bad Request");
meili_snap::snapshot!(meili_snap::json_string!(response), @r###" 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", "code": "bad_request",
"type": "invalid_request", "type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#bad_request" "link": "https://docs.meilisearch.com/errors#bad_request"

View File

@ -18,7 +18,8 @@ async fn index_with_documents_user_provided<'a>(
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "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, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);

View File

@ -98,7 +98,8 @@ async fn secrets_are_hidden_in_settings() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);

View File

@ -55,7 +55,8 @@ async fn basic() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -244,7 +245,8 @@ async fn ranking_score_threshold() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -523,7 +525,8 @@ async fn filter() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -650,7 +653,8 @@ async fn limit_and_offset() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);

View File

@ -16,7 +16,8 @@ async fn add_remove_user_provided() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -159,7 +160,8 @@ async fn generate_default_user_provided_documents(server: &Server) -> Index {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);
@ -516,7 +518,8 @@ async fn add_remove_one_vector_4588() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);

View File

@ -14,7 +14,8 @@ async fn update_embedder() {
{ {
"vectorStore": true, "vectorStore": true,
"metrics": false, "metrics": false,
"logsRoute": false "logsRoute": false,
"editDocumentsByFunction": false
} }
"###); "###);