mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
fix a panic in yaup
This commit is contained in:
parent
63dded3961
commit
734d1c53ad
@ -429,6 +429,6 @@ impl Index<'_> {
|
|||||||
pub struct GetAllDocumentsOptions {
|
pub struct GetAllDocumentsOptions {
|
||||||
pub limit: Option<usize>,
|
pub limit: Option<usize>,
|
||||||
pub offset: Option<usize>,
|
pub offset: Option<usize>,
|
||||||
pub fields: Option<Vec<&'static str>>,
|
|
||||||
pub retrieve_vectors: bool,
|
pub retrieve_vectors: bool,
|
||||||
|
pub fields: Option<Vec<&'static str>>,
|
||||||
}
|
}
|
||||||
|
@ -223,9 +223,7 @@ async fn test_get_all_documents_attributes_to_retrieve() {
|
|||||||
assert_eq!(response["limit"], json!(20));
|
assert_eq!(response["limit"], json!(20));
|
||||||
assert_eq!(response["total"], json!(77));
|
assert_eq!(response["total"], json!(77));
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index.get_all_documents_raw("?fields=").await;
|
||||||
.get_all_documents(GetAllDocumentsOptions { fields: Some(vec![]), ..Default::default() })
|
|
||||||
.await;
|
|
||||||
assert_eq!(code, 200);
|
assert_eq!(code, 200);
|
||||||
assert_eq!(response["results"].as_array().unwrap().len(), 20);
|
assert_eq!(response["results"].as_array().unwrap().len(), 20);
|
||||||
for results in response["results"].as_array().unwrap() {
|
for results in response["results"].as_array().unwrap() {
|
||||||
|
Loading…
Reference in New Issue
Block a user