Skip to content

Commit 7fc902e

Browse files
committed
feat: increase default limit for search results from 20 to 100
1 parent 9cea757 commit 7fc902e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/search-manager/data/api.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,17 @@ export async function fetchSearchResults({
310310
};
311311
}
312312

313-
/* eslint-disable no-await-in-loop */
314313
export async function fetchAllSearchResults(
315314
params: FetchSearchParams,
316315
): Promise<{
317-
hits: HitType[];
318-
totalHits: number;
319-
blockTypes: Record<string, number>;
320-
problemTypes: Record<string, number>;
321-
publishStatus: Record<string, number>;
322-
}> {
316+
hits: HitType[];
317+
totalHits: number;
318+
blockTypes: Record<string, number>;
319+
problemTypes: Record<string, number>;
320+
publishStatus: Record<string, number>;
321+
}> {
323322
const allHits: HitType[] = [];
324-
const limit = params.limit ?? 20;
323+
const limit = params.limit ?? 100;
325324

326325
let offset = 0;
327326
let nextOffset: number | undefined;
@@ -333,6 +332,7 @@ export async function fetchAllSearchResults(
333332
let publishStatus: Record<string, number> = {};
334333

335334
do {
335+
// eslint-disable-next-line no-await-in-loop
336336
const page = await fetchSearchResults({
337337
...params,
338338
offset,
@@ -360,7 +360,6 @@ export async function fetchAllSearchResults(
360360
publishStatus,
361361
};
362362
}
363-
/* eslint-enable no-await-in-loop */
364363

365364
/**
366365
* Fetch the block types facet distribution for the search results.

0 commit comments

Comments
 (0)