-
Notifications
You must be signed in to change notification settings - Fork 100
Add support to the pagination setting customization at the index level #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to the pagination setting customization at the index level #342
Conversation
Hello @vishalsodani, PS: This message was sent automatically! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution 🔥
Please go over your code again to ensure that you updated the types everywhere. |
Thanks! Sure. |
Should I add PaginationSetting to Settings struct as a member? |
Absolutely! |
Could you add tests at the bottom of the file? I do realize that there are no previous tests made, but we should start making them |
What tests? Are you asking to write some specific kind of tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the bottom of the settings.rs
you can start adding tests the following way:
#[cfg(test)]
mod tests {
use super::*;
use crate::client::*;
use meilisearch_test_macro::meilisearch_test;
#[meilisearch_test]
async fn test_get_pagination(index: Index) {
let res = index.get_pagination().await.unwrap();
let pagination = PaginationSetting {
max_total_hits: 1000,
};
assert_eq!(pagination, res);
}
}
Could you also make one for update and reset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some styling changes
Done. |
Co-authored-by: cvermand <[email protected]>
Are you still working on this @vishalsodani? |
Yes, of course. Are there any issues left to be fixed? |
Yes unfortunately there is a conflict, could you resolve it? |
resolved. |
Your clippy checks are failing, could you resolve them? |
Any idea about this issue?
|
@irevoire any idea about this? Is boxing the good response to this issue? |
I checked with him and it's good :) It should even improve the performances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥🔥🔥🔥🔥
bors merge |
Build succeeded:
|
This message is sent automatically Thanks again for contributing to Meilisearch ❤️ |
Pull Request
What does this PR do?
Fixes #304
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!