Evaluate using LeafCollector::finish API in lucene for aggregation postCollection processing #9411
Labels
enhancement
Enhancement or improvement to existing feature or request
Search:Aggregations
Search
Search query, autocomplete ...etc
Is your feature request related to a problem? Please describe.
In lucene 9.8, there is a postCollection hook added for LeafCollector to perform some processing after document collection. In OpenSearch we have postCollection implemented specifically for all the aggregation implementation via BucketCollector interface.
Describe the solution you'd like
Replace
BucketCollector::postCollection
withLeafCollector::finish
wherever possibleDescribe alternatives you've considered
N/A
Additional context
With concurrent search we made a change to call postCollection for aggregations in the executor threads instead of the main search thread as it was resulting in AssertingCodecs failure due to codec being accessed by multiple threads. Ref #8303. With this change we can remove that special handling.
The text was updated successfully, but these errors were encountered: