mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
feat(http): update the documents resource
- Return Documents API resources on `/documents` in an array in the the results field. - Add limit, offset and total in the response body. - Rename `attributesToRetrieve` into `fields` (only for the `/documents` endpoints, not for the `/search` ones). - The `displayedAttributes` settings does not impact anymore the displayed fields returned in the `/documents` endpoints. These settings only impacts the `/search` endpoint. Fix #2372
This commit is contained in:
parent
ab39df9693
commit
ddad6cc069
11 changed files with 217 additions and 200 deletions
|
@ -828,7 +828,7 @@ async fn add_larger_dataset() {
|
|||
})
|
||||
.await;
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response.as_array().unwrap().len(), 77);
|
||||
assert_eq!(response["results"].as_array().unwrap().len(), 77);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
@ -849,7 +849,7 @@ async fn update_larger_dataset() {
|
|||
})
|
||||
.await;
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response.as_array().unwrap().len(), 77);
|
||||
assert_eq!(response["results"].as_array().unwrap().len(), 77);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue