Skip to content

Introduce AllGroupsCollectorManager - #15557

Merged
javanna merged 10 commits into
apache:mainfrom
gaobinlong:allGroupsCollectorManager
Apr 30, 2026
Merged

Introduce AllGroupsCollectorManager#15557
javanna merged 10 commits into
apache:mainfrom
gaobinlong:allGroupsCollectorManager

Conversation

@gaobinlong

Copy link
Copy Markdown
Contributor

Description

AllGroupsCollector in grouping package did not have until now a corresponding collector manager, this pr introduces one and switches TestAllGroupsCollector to use search concurrency and move away from the deprecated search(Query, Collector) method.

Relates to #12892.

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions github-actions Bot added this to the 11.0.0 milestone Jan 9, 2026
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@gaobinlong

Copy link
Copy Markdown
Contributor Author

@javanna, could you help to review this PR, thanks!

@github-actions

Copy link
Copy Markdown
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Jan 24, 2026
@gaobinlong

Copy link
Copy Markdown
Contributor Author

@jpountz @romseygeek @dweiss could you help to review this PR, thank you~

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions github-actions Bot removed the Stale label Mar 24, 2026
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Apr 7, 2026
@javanna

javanna commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Hey @gaobinlong sorry for the delay in getting back to you. I had a look at this PR. I am not super familiar with the grouping API, so I may not be the best person to advise on how to move forward with the change.

My initial thoughts: this PR introduces a new public API that is only used in a test. Can it be used by users as-is like such test does? Are there other places where Lucene itself could rely on this new collector manager in production code? it seems like GroupingSearch is a good candidate but it relies on MultiCollector which complicates things quite a bit and needs some rework. I am also not entirely sure about the Collection<?> generic type, does that need to be as broad?

All in all, I am trying to determine if this is a step forward in the right direction. It may make sense to play further with GroupingSearch or in alternative keep this change small but introduce the manager only to the test that it affects, unless we are 100% sure that Lucene users can use the new manager as-is.

What do you think?

@gaobinlong

gaobinlong commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for your comment, @javanna ,

Can it be used by users as-is like such test does?

Yes, I'm sure it can be used by users like the test cases.

Are there other places where Lucene itself could rely on this new collector manager in production code? it seems like GroupingSearch is a good candidate but it relies on MultiCollector which complicates things quite a bit and needs some rework

Yes, I noticed that in GroupingSearch, and we need to replace the AllGroupsCollector with AllGroupsCollectorManager, but we need to also introduce FirstPassGroupCollectorManger and AllGroupHeadsCollectorManager, then use MultiCollectorManager to wrap all of the collectorManager into one, then it works.

I am also not entirely sure about the Collection<?> generic type, does that need to be as broad?

No, this really is a problem, I've refactored the code to use T instead, thanks!

@javanna javanna left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update @gaobinlong . I had another look and left a couple more comments. I will merge this PR once those are addressed.

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@gaobinlong

Copy link
Copy Markdown
Contributor Author

@javanna, sorry for the delay, I've addressed all of the new comments, please take another look, thanks!

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions github-actions Bot modified the milestones: 11.0.0, 10.5.0 Apr 28, 2026

@javanna javanna left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a comment about moving the changes entry, LGTM otherwise. Thanks!

Comment thread lucene/CHANGES.txt Outdated

* GITHUB#15976: Store DocValuesSkipper data in their own file. (Alan Woodward)

* GITHUB#15557: Introduce AllGroupsCollectorManager to parallelize search when using AllGroupsCollector. (Binlong Gao)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please move this to the 10.4 section? I think it makes sense to backport this change, for users to immediately start benefiting of the new collector manager.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done that, thanks!

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@javanna
javanna merged commit 4492860 into apache:main Apr 30, 2026
13 checks passed
javanna pushed a commit that referenced this pull request Apr 30, 2026
AllGroupsCollector in grouping package did not have until now a corresponding collector manager, this pr introduces one and switches TestAllGroupsCollector to use search concurrency and move away from the deprecated search(Query, Collector) method.

Relates to #12892

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@javanna

javanna commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Thanks @gaobinlong I merged this to main and backported to 10x.

sgup432 pushed a commit to sgup432/lucene that referenced this pull request May 4, 2026
AllGroupsCollector in grouping package did not have until now a corresponding collector manager, this pr introduces one and switches TestAllGroupsCollector to use search concurrency and move away from the deprecated search(Query, Collector) method.

Relates to apache#12892

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants