Skip to content

Commit

Permalink
Fix BlobStoreIncrementalityIT, again
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <kalsac@amazon.com>
  • Loading branch information
Sachin Kale committed Sep 4, 2023
1 parent a437510 commit a0eb936
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -545,7 +545,7 @@ protected Settings.Builder snapshotRepoSettingsForShallowCopy(Path path) {

protected long getCountForIndex(String indexName) {
return client().search(
new SearchRequest(new SearchRequest(indexName).source(new SearchSourceBuilder().size(0).trackTotalHits(true)))
new SearchRequest(new SearchRequest(indexName).preference("_primary").source(new SearchSourceBuilder().size(0).trackTotalHits(true)))
).actionGet().getHits().getTotalHits().value;
}

Expand Down

0 comments on commit a0eb936

Please sign in to comment.