From 2db16bc338f8fa6f6162a28117d4607601254460 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Mon, 10 Jun 2024 15:47:03 -0500 Subject: [PATCH] Add track_total_hits to GetESLastModified --- indexers/base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexers/base.go b/indexers/base.go index 348ea35..59305a9 100644 --- a/indexers/base.go +++ b/indexers/base.go @@ -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 {