You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let url = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
447
+
let client = Client::new(format!("{}/hello", url),Some("masterKey"));
448
+
let index = client.index("test_get_documents_with_filter_wrong_ms_version");
449
+
450
+
let documents = DocumentsQuery::new(&index)
451
+
.with_filter("id = 1")
452
+
.execute::<MyObject>()
453
+
.await;
454
+
455
+
let error = documents.unwrap_err();
456
+
457
+
let message = Some("Hint: It might not be working because you're not up to date with the Meilisearch version that updated the get_documents_with method.".to_string());
458
+
let url = "http://localhost:7700/hello/indexes/test_get_documents_with_filter_wrong_ms_version/documents/fetch".to_string();
459
+
let status_code = 404;
460
+
let displayed_error = "MeilisearchCommunicationError: The server responded with a 404. Hint: It might not be working because you're not up to date with the Meilisearch version that updated the get_documents_with method.\nurl: http://localhost:7700/hello/indexes/test_get_documents_with_filter_wrong_ms_version/documents/fetch";
461
+
462
+
match&error {
463
+
Error::MeilisearchCommunication(error) => {
464
+
assert_eq!(error.status_code, status_code);
465
+
assert_eq!(error.message, message);
466
+
assert_eq!(error.url, url);
467
+
}
468
+
_ => panic!("The error was expected to be a MeilisearchCommunicationError error, but it was not."),
let message = "Attribute `id` is not filterable. This index does not have configured filterable attributes.
489
+
1:3 id = 1
490
+
Hint: It might not be working because you're not up to date with the Meilisearch version that updated the get_documents_with method.".to_string();
491
+
let displayed_error = "Meilisearch invalid_request: invalid_document_filter: Attribute `id` is not filterable. This index does not have configured filterable attributes.
492
+
1:3 id = 1
493
+
Hint: It might not be working because you're not up to date with the Meilisearch version that updated the get_documents_with method.. https://docs.meilisearch.com/errors#invalid_document_filter";
494
+
495
+
match&error {
496
+
Error::Meilisearch(error) => {
497
+
assert_eq!(error.error_message, message);
498
+
}
499
+
_ => panic!("The error was expected to be a MeilisearchCommunicationError error, but it was not."),
pubconstMEILISEARCH_VERSION_HINT:&str = "Hint: It might not be working because you're not up to date with the Meilisearch version that updated the get_documents_with method";
0 commit comments