Skip to content

Introduce AllGroupsCollectorManager#15557

Open
gaobinlong wants to merge 6 commits intoapache:mainfrom
gaobinlong:allGroupsCollectorManager
Open

Introduce AllGroupsCollectorManager#15557
gaobinlong wants to merge 6 commits intoapache: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
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

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
Copy link
Copy Markdown
Contributor

javanna commented Apr 13, 2026

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
Copy link
Copy Markdown
Contributor Author

gaobinlong commented Apr 14, 2026

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!

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