mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
[APM] Add rest_total_hits_as_int to all ES requests (#26462)
This commit is contained in:
parent
15636c4f6b
commit
d3330a6ea9
2 changed files with 53 additions and 1 deletions
|
@ -63,7 +63,12 @@ export function setupRequest(req: Request): Setup {
|
|||
console.log(`GET ${params.index}/_search`);
|
||||
console.log(JSON.stringify(params.body, null, 4));
|
||||
}
|
||||
return cluster.callWithRequest(req, type, params);
|
||||
|
||||
const nextParams = {
|
||||
...params,
|
||||
rest_total_hits_as_int: true // ensure that ES returns accurate hits.total with pre-6.6 format
|
||||
};
|
||||
return cluster.callWithRequest(req, type, nextParams);
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue