Skip to content

Commit b0ca845

Browse files
algolia-botFluf22
andcommitted
fix(clients): update browse iterator (generated)
algolia/api-clients-automation#4058 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Thomas Raffray <[email protected]>
1 parent 2fe37ea commit b0ca845

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/client-search/src/searchClient.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ export function createSearchClient({
412412
indexName,
413413
browseParams: {
414414
cursor: previousResponse ? previousResponse.cursor : undefined,
415+
hitsPerPage: 1000,
415416
...browseParams,
416417
},
417418
},
@@ -456,7 +457,7 @@ export function createSearchClient({
456457
requestOptions,
457458
);
458459
},
459-
validate: (response) => response.nbHits < params.hitsPerPage,
460+
validate: (response) => response.hits.length < params.hitsPerPage,
460461
...browseRulesOptions,
461462
});
462463
},
@@ -501,7 +502,7 @@ export function createSearchClient({
501502
params.page += 1;
502503
return resp;
503504
},
504-
validate: (response) => response.nbHits < params.hitsPerPage,
505+
validate: (response) => response.hits.length < params.hitsPerPage,
505506
...browseSynonymsOptions,
506507
});
507508
},

0 commit comments

Comments
 (0)