From c496b3e71269d49a94e6836d4584684e8d367627 Mon Sep 17 00:00:00 2001 From: Artur Wierzbicki Date: Fri, 24 Jun 2022 21:21:59 +0400 Subject: [PATCH] Search: Fix pagination in the new search page (#51366) * Fix pagination in the new search * update betterer betterer betterer betterer betterer betterer * revert packagejson --- .betterer.results | 4 ++-- public/app/features/search/service/bluge.ts | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.betterer.results b/.betterer.results index ff1b7347bd1..87ccbddb706 100644 --- a/.betterer.results +++ b/.betterer.results @@ -4473,10 +4473,10 @@ exports[`no explicit any`] = { [24, 44, 3, "Unexpected any. Specify a different type.", "193409811"], [24, 78, 3, "Unexpected any. Specify a different type.", "193409811"] ], - "public/app/features/search/service/bluge.ts:2088777935": [ + "public/app/features/search/service/bluge.ts:3054830800": [ [38, 13, 3, "Unexpected any. Specify a different type.", "193409811"], [85, 9, 3, "Unexpected any. Specify a different type.", "193409811"], - [134, 15, 3, "Unexpected any. Specify a different type.", "193409811"] + [145, 15, 3, "Unexpected any. Specify a different type.", "193409811"] ], "public/app/features/search/service/sql.ts:1428696565": [ [91, 36, 3, "Unexpected any. Specify a different type.", "193409811"] diff --git a/public/app/features/search/service/bluge.ts b/public/app/features/search/service/bluge.ts index 939063a7715..66780da18ff 100644 --- a/public/app/features/search/service/bluge.ts +++ b/public/app/features/search/service/bluge.ts @@ -131,7 +131,18 @@ async function doSearchQuery(query: SearchQuery): Promise { const frame = ( await lastValueFrom( ds.query({ - targets: [{ ...target, refId: 'Page', facet: undefined, from, limit: Math.max(limit, nextPageSizes) }], + targets: [ + { + ...target, + search: { + ...(target?.search ?? {}), + from, + limit: Math.max(limit, nextPageSizes), + }, + refId: 'Page', + facet: undefined, + }, + ], } as any) ) ).data?.[0] as DataFrame;