Skip to content

Commit

Permalink
set tracking the hits to true
Browse files Browse the repository at this point in the history
  • Loading branch information
Al Niessner authored and Al Niessner committed Aug 1, 2023
1 parent d81b153 commit 5684a63
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ public SearchRequest build(RequestBuildContext context, String index) {
ProductQueryBuilderUtil.addPresetCriteria(this.base, context.getPresetCriteria());
}

return new SearchRequest().indices(index)
.source(new SearchSourceBuilder().query(this.base).fetchSource(
context.getFields().toArray(new String[0]),
SearchRequestFactory.excludes(context.getFields())));
return new SearchRequest()
.indices(index)
.source(new SearchSourceBuilder()
.query(this.base)
.fetchSource(context.getFields().toArray(new String[0]),
SearchRequestFactory.excludes(context.getFields()))
.trackTotalHits(true));
}
}

0 comments on commit 5684a63

Please sign in to comment.