Skip to content
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

Search: inconsistency with count, page_count and the number of products. #9278

Open
monsieurtanuki opened this issue Nov 10, 2023 · 1 comment

Comments

@monsieurtanuki
Copy link
Contributor

What

Steps to reproduce the behavior

https://world.openfoodfacts.org/cgi/search.pl?lc=en&tags_lc=en&fields=code&tagtype_0=creator&tag_contains_0=contains&tag_0=monsieurtanuki&page_size=1000&search_terms=&json=1&api_version=3

{
    "count": 6,
    "page": 1,
    "page_count": 5,
    "page_size": 1000,
    "products": [
        {
            "code": "8032597603380"
        },
        {
            "code": "07790386"
        },
        {
            "code": "1407178902"
        },
        {
            "code": "9786756453"
        },
        {
            "code": "1407178901"
        }
    ],
    "skip": 0
}

Expected behavior

  • We expect count and the recent (?) page_count to be identical, and equal to the number of retrieved products, which is 5 in that json.
  • Here, count is 6, page_count is 5 and there are 5 products.
@stephanegigandet
Copy link
Contributor

It may be a caching issue, I get a count of 6 with caching, and 5 without caching. We currently have different caches for the counts and for the results.

@teolemon teolemon moved this to To discuss and validate in 🍊 Open Food Facts Server issues Apr 23, 2024
@teolemon teolemon removed the 🐛 bug This is a bug, not a feature request. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To discuss and validate
Development

No branches or pull requests

3 participants