Skip to content

Commit a7c7070

Browse files
committed
try force GC for search hits array
1 parent 70407f2 commit a7c7070

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/main/java/org/elasticsearch/search/diversification/mmr/MMRResultDiversification.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ public SearchHits diversify(SearchHits hits, ResultDiversificationContext divers
116116
ret[i] = searchHits[scoredDocIndex];
117117
}
118118

119+
// cleanup for GC
120+
searchHits = null;
121+
119122
return new SearchHits(
120123
ret,
121124
hits.getTotalHits(),

0 commit comments

Comments
 (0)