Skip to content

Commit 1f921d5

Browse files
authored
Merge pull request #1704 from pelias/track_total_hits
Allow sending `track_total_hits` with ES query
2 parents 88146c0 + 750d2ac commit 1f921d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controller/search.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ function setup( peliasConfig, esclient, query, should_execute ){
5959
cmd.explain = true;
6060
}
6161

62+
if (_.get(apiConfig, 'trackTotalHits') === true) {
63+
cmd.track_total_hits = true;
64+
}
65+
6266
// support for the 'clean.exposeInternalDebugTools' config flag
6367
let debugUrl;
6468
if (_.get(req, 'clean.exposeInternalDebugTools') === true) {

0 commit comments

Comments
 (0)