Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/ui/public/courier/utils/courier_inspector_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ function getResponseInspectorStats(searchSource, resp) {
}

if (resp && resp.hits) {
stats.Hits = {
stats['Hits (total)'] = {
value: `${resp.hits.total}`,
description: 'The number of documents that match the query.',
};

stats.Hits = {
value: `${resp.hits.hits.length}`,
description: 'The number of documents returned by the query.',
};
}

if (lastRequest && (lastRequest.ms === 0 || lastRequest.ms)) {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/discover/_inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }) {
const STATS_ROW_VALUE_INDEX = 1;
function getHitCount(requestStats) {
const hitsCountStatsRow = requestStats.find((statsRow) => {
return statsRow[STATS_ROW_NAME_INDEX] === 'Hits';
return statsRow[STATS_ROW_NAME_INDEX] === 'Hits (total)';
});
return hitsCountStatsRow[STATS_ROW_VALUE_INDEX];
}
Expand Down