Thanks @Levi for your time and answer. Do you have a way to see how many articles the above request gives you ? On my side I can only retrieve 184 of them, (which is the same amount of articles I get without adding "lang=*" to the query) The thing is we have more than 250 on Prismic. And articles in other languages than french are not popping up in these 184 (we have at least 40 articles in english).
Thanks
@Levi, yes I have the 313 as well by following your link ! Which is really reassuring
However, in the lambda I’m calling it from, I still get 184 results. When I change it to lang=en, I get the 184 results as well, as if it was not “reading” the lang parameter in the url.
Any idea about that ?
Thanks !
@sarah.ledu Can you share with me the code you’re using to make your query as well as the final query string that is constructed when you make your call to the API?
@Levi, here is the code : query = '[[at(document.type, "blog_article")]]' url = f"https://payfit.cdn.prismic.io/api/v2/documents/search?ref={ref}&q={query}&lang=*"
@sarah.ledu Okay I think I can see what the issue is here. When you’re dealing with multi-language content, you can’t use the next_page url. It doesn’t take into account the lang attribute so after the first page, you will only receive documents in your main language.
In order to get around this issue, you’ll need to paginate the original url with &page=2 and so on until you’ve retrieved all the pages.
Give that a try and let me know if it solves this issue for you.