You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function that is called for every request doesn't keep the records from the previous response: algoliasearch/search/client.py
The function _func, which is passed to create_iterable_sync, doesn't use the previous response _prev, which it gets passed in retry: algoliasearch/http/helpers.py
The result is that only the last response from self.browse(...) is actually returned. All other responses are discarded.
I found a workaround, where I create an "aggregator" that appends the hits from each response to a non-local list, but that doesn't seem like it should be necessary:
Hey, thanks for opening the issue! Actually we should make it clear that aggregator is required, the workaround you found is in fact the way to leverage this browse_objects helper, we do the pagination and you use the responses however you want
Description
When using
SearchClientSync.browse_objects
to retrieve all records (as suggested by the documentation: https://www.algolia.com/doc/libraries/python/v4/helpers/#browse-for-records), theBrowseResponse
that is returned only contains the hits from the last page. Hits on all prior pages are discarded:The function that is called for every request doesn't keep the records from the previous response:
algoliasearch/search/client.py
The function
_func
, which is passed tocreate_iterable_sync
, doesn't use the previous response_prev
, which it gets passed inretry
:algoliasearch/http/helpers.py
The result is that only the last response from
self.browse(...)
is actually returned. All other responses are discarded.I found a workaround, where I create an "aggregator" that appends the hits from each response to a non-local list, but that doesn't seem like it should be necessary:
The text was updated successfully, but these errors were encountered: