Skip to content

Commit 11c7347

Browse files
committed
iter
1 parent 170a098 commit 11c7347

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

server/src/main/java/org/elasticsearch/action/search/CanMatchPreFilterSearchPhase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ private synchronized List<SearchShardIterator> getIterator(List<SearchShardItera
434434
}
435435
int i = 0;
436436
for (SearchShardIterator iter : shardsIts) {
437+
iter.reset();
437438
boolean match = possibleMatches.get(i++);
438439
if (match) {
439440
assert iter.skip() == false;

server/src/main/java/org/elasticsearch/action/search/SearchShardIterator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ List<String> getTargetNodeIds() {
128128
return targetNodesIterator.asList();
129129
}
130130

131+
void reset() {
132+
targetNodesIterator.reset();
133+
}
134+
131135
/**
132136
* Returns <code>true</code> if the search execution should skip this shard since it can not match any documents given the query.
133137
*/

0 commit comments

Comments
 (0)