-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Document or Increase the maximum amount of results using facets #69
Comments
In the original link (for example |
Hi ! Was just getting started with openfoodfacts when I came across this issue. The actual problem here is
Even though, we can surely increase the limit on the number of records returned, it will almost certainly lead to a decrease in performance and increased waiting times. A suggested way to solve this issue would be to create a set of new functions which handle pagination. We could have 2 different types of functions : The Combined, these 2 suggestions if implemented, should be able to solve the following issues
|
Would love to work on and implement these features, if they could help address the above mentioned issues. |
@linogaliana @MahmoudHamdy02 @Anubhav-Bhargava kindly do let me know about your views on this approach. |
Hi, thanks for the suggestion. Yes I think it's a great idea ! This would not penalize people that do not need to retrieve a large number of items but could help others to retrieve more data. |
Awesome. Thank you for the review. I'll start working on this feature right away and open a PR once its done. |
@linogaliana have you tried using this : https://world.openfoodfacts.org/?json=packaging&page=300 This seems to be working and is paginating the data properly. The problem seems to be due to the direct call to the Kindly do let me know if the above solution works for you. Thanks ! @alexgarel @teolemon would be grateful if you could kindly review this issue and the above mentioned solution once. Open to suggestions regarding the implementation of the |
Hi @Ansh-Sarkar thank you for trying to contribute, and really sorry for the lag (I let this notification slip away…). I'll comment your ticket, but yes I'm 100% in favour of a class. Also you are encouraged to migrate as much as possible to the current API: https://openfoodfacts.github.io/api-documentation/ warning the search v2 documentation is here (for now): https://wiki.openfoodfacts.org/Open_Food_Facts_Search_API_Version_2 |
@alexgarel not an issue at all. Had been waiting for a reply in order to commence work on this. Will surely join the slack channel and start implementing this feature. Would be glad to contribute. Also yeah I'll check out the API documentation as well. Thanks! |
I have the impression that the maximum number of echoes when requesting using
facets
is 10 000. I don't see that mentionned in theREADME
or in thedoc
. Is it possible to get more results ? (maybe I am doing something wrong)Otherwise, mentionning that in the
README
would be useful.The text was updated successfully, but these errors were encountered: