Skip to content

Commit

Permalink
migrate away from rest_total_hits_as_int (#84508) (#84734)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Dec 2, 2020
1 parent b3daf44 commit a9af362
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ function GraphWorkspace(options) {

// Search for connections between the selected nodes.
searcher(self.options.indexName, searchReq, function (data) {
const numDocsMatched = data.hits.total;
const numDocsMatched = data.hits.total.value;
const buckets = data.aggregations.matrix.buckets;
const vertices = nodesForLinking.map(function (existingNode) {
return {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/graph/server/routes/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function registerSearchRoute({
await esClient.asCurrentUser.search({
index: request.body.index,
body: request.body.body,
rest_total_hits_as_int: true,
track_total_hits: true,
ignore_throttled: !includeFrozen,
})
).body,
Expand Down

0 comments on commit a9af362

Please sign in to comment.