Skip to content

Conversation

gaobinlong
Copy link
Contributor

@gaobinlong gaobinlong commented Oct 10, 2025

Description

As this comment said, once MultiCollector.getCollectors() method in Lucene is declared as public, we can use that method directly rather than creating a new similar class, this PR replaces MultiCollectorWrapper with MultiCollector in Lucene, and removes MultiCollectorWrapper as it was internally used and won't be used anymore.

Related Issues

No issue.

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Binlong Gao <[email protected]>
Copy link
Contributor

❌ Gradle check result for db44cf9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for db44cf9: SUCCESS

Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.96%. Comparing base (2695c93) to head (6fd02e5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19595      +/-   ##
============================================
- Coverage     73.06%   72.96%   -0.11%     
+ Complexity    70630    70542      -88     
============================================
  Files          5723     5722       -1     
  Lines        323513   323503      -10     
  Branches      46852    46851       -1     
============================================
- Hits         236384   236032     -352     
- Misses        68013    68400     +387     
+ Partials      19116    19071      -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

❕ Gradle check result for 6fd02e5: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Member

@sandeshkr419 sandeshkr419 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor code refactoring near the lines of code you are touching upon!

for (final Collector sub : (((MultiCollectorWrapper) collector).getCollectors())) {
if (collector instanceof MultiCollector m) {
for (final Collector sub : (m.getCollectors())) {
if (sub instanceof TopDocsCollector<?>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to your code change, but can you also do Pattern Matching for instanceof in consecutive lines of code as well in the same method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants