Skip to content

Commit

Permalink
Add track_total_hits to GetESLastModified
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jun 10, 2024
1 parent 33f791b commit 2db16bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indexers/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (i *baseIndexer) GetESLastModified(index string) (time.Time, error) {
_, err := utils.MakeJSONRequest(
http.MethodPost,
fmt.Sprintf("%s/%s/_search", i.elasticURL, index),
[]byte(`{ "sort": [{ "modified_on_mu": "desc" }], "_source": {"includes": ["modified_on", "id"]}, "size": 1}`),
[]byte(`{ "sort": [{ "modified_on_mu": "desc" }], "_source": {"includes": ["modified_on", "id"]}, "size": 1, "track_total_hits": false}`),
queryResponse,
)
if err != nil {
Expand Down

0 comments on commit 2db16bc

Please sign in to comment.