Open alexfauquette opened 1 year ago
I get elements for the 1st requests. You might have been unlucky when you requested. Can we close @alexfauquette ?
I tried again, but it's not better.
I opened the two links in distinct tabs, and ch
returns immediatly a response, wherase world loads during 30 seconds for and empty answer
See the recording
Anything in the server logs? It's a bit weird to have a timeout that produces an empty result array (at least in this case). 🤔
- It's most definitely a timeout since https://world.openfoodfacts.org/state/ingredients-photo-selected/state/ingredients-to-be-completed timeouts as well cc @john-gom @stephanegigandet
- Interesting factoid: we'd have 300K products in that case (ingredient photo, ingredients not extracted, ping @raphael0202 )
- A drastic measure about that would be very tempting
That particular query creates the following MongoDB query which off-query doesn't currently support:
{
"$and": [
{
"states_tags": "en:ingredients-photo-selected"
},
{
"states_tags": "en:ingredients-to-be-completed"
}
]
}
So this query will be falling back to products_tags in MongoDB. Adding "and" support to off-query should be relatively easy
Note that @raphael0202 's original queries don't hit off-query at all
What
It seems that Switzerland is now independent from the world 😁. At least when doing a search on OFF
I was looking for products that: have an ingredients image, but no ingredients. It failed up to when I got the idea to search for a dedicated country.
Steps to reproduce the behavior
{"page":1,"page_size":24,"products":[],"skip":0}
Expected behavior
ch.
should be a subset ofworld.