if self._raw_response["nbHits"] < self._data["hitsPerPage"]: was never validated since nbHits does not represent the number of returned hits but the total of hits.
We now compute nbHits on the len(hits).
What problem is this fixing?
Recursion was never ending with iterations > 1000 hitsPerPage.
Reproduction
I've set an index (python_repro_rules) with 3k+ rules on this app (QPBQ67WNIG)
from algoliasearch.search_client import SearchClient, SearchConfig
config = SearchConfig('QPBQ67WNIG', 'SEARCH_API_KEY')
client = SearchClient.create_with_config(config)
index = client.init_index('python_repro_rules')
i = 0
for rule in index.browse_rules():
print('called in main', i)
i += 1
Describe your change
if self._raw_response["nbHits"] < self._data["hitsPerPage"]:
was never validated sincenbHits
does not represent the number of returned hits but the total of hits.We now compute
nbHits
on thelen(hits)
.What problem is this fixing?
Recursion was never ending with iterations > 1000
hitsPerPage
.Reproduction
I've set an index (
python_repro_rules
) with 3k+ rules on this app (QPBQ67WNIG
)