Skip to content

Commit a1860f0

Browse files
authored
Avoid using concurrent collector manager in LuceneChangesSnapshot (#113816)
The searcher never gets an executor set, then we can save the overhead of the concurrent collector manager / collectors.
1 parent fe5940e commit a1860f0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/changelog/113816.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 113816
2+
summary: Avoid using concurrent collector manager in `LuceneChangesSnapshot`
3+
area: Search
4+
type: enhancement
5+
issues: []

server/src/main/java/org/elasticsearch/index/engine/LuceneChangesSnapshot.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ private TopDocs searchOperations(FieldDoc after, boolean accurateTotalHits) thro
301301
new Sort(sortBySeqNo),
302302
searchBatchSize,
303303
after,
304-
accurateTotalHits ? Integer.MAX_VALUE : 0
304+
accurateTotalHits ? Integer.MAX_VALUE : 0,
305+
false
305306
);
306307
return indexSearcher.search(rangeQuery, topFieldCollectorManager);
307308
}

0 commit comments

Comments
 (0)