gaobinlong commented on code in PR #15557:
URL: https://github.com/apache/lucene/pull/15557#discussion_r3151922656
##########
lucene/grouping/src/test/org/apache/lucene/search/grouping/TestAllGroupsCollector.java:
##########
@@ -121,12 +127,13 @@ private void addGroupField(Document doc, String
groupField, String value) {
doc.add(new SortedDocValuesField(groupField, new BytesRef(value)));
}
- private AllGroupsCollector<?> createRandomCollector(String groupField) {
+ private AllGroupsCollectorManager<?> createRandomCollectorManager(String
groupField) {
if (random().nextBoolean()) {
- return new AllGroupsCollector<>(new TermGroupSelector(groupField));
+ return new AllGroupsCollectorManager<>(() -> new
TermGroupSelector(groupField));
} else {
ValueSource vs = new BytesRefFieldSource(groupField);
- return new AllGroupsCollector<>(new ValueSourceGroupSelector(vs, new
HashMap<>()));
+ return new AllGroupsCollectorManager<>(
+ () -> new ValueSourceGroupSelector(vs, new HashMap<>()));
Review Comment:
Yes, the context can be shared across selectors, changed that, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]