Skip to content

Commit

Permalink
Fix bug where we didn't shim total hits in search source on the server.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeelmers committed Dec 9, 2020
1 parent 7a07b7f commit 8e258ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/data/server/search/search_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
const searchSourceDependencies: SearchSourceDependencies = {
getConfig: <T = any>(key: string): T => uiSettingsCache[key],
search: asScoped(request).search,
// onResponse isn't used on the server, so we just return the original value
onResponse: (req, res) => res,
onResponse: (req, res) => shimHitsTotal(res),
legacy: {
callMsearch: getCallMsearch({
esClient,
Expand Down

0 comments on commit 8e258ec

Please sign in to comment.