migrate away from rest_total_hits_as_int (#84508)

This commit is contained in:
Joe Reuter 2020-12-02 09:26:22 +01:00 committed by GitHub
parent 2c084b796f
commit b454f2a1c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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 {

View file

@ -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,