[ 
https://issues.apache.org/jira/browse/LUCENE-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907991#action_12907991
 ] 

Yonik Seeley commented on LUCENE-2636:
--------------------------------------

Heh - Solr added a MultiCollector a few weeks ago (and it does exactly the same 
thing).
As far as naming, I agree this isn't a chaining collector, but a branching 
collector (and MultiCollector is a better name).

Solr's version also has this, which simplifies building a list of collectors 
and then creating a single collector:
{code}
  public static Collector wrap(List<? extends Collector> collectors) {
    return collectors.size() == 1 ? collectors.get(0) : new 
MultiCollector(collectors);  
  }
{code}

We should consolidate these two versions of course.

> Create ChainingCollector
> ------------------------
>
>                 Key: LUCENE-2636
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2636
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2636.patch
>
>
> ChainingCollector allows chaining a bunch of Collectors, w/o them needing to 
> know or care about each other, and be passed into Lucene's search API, since 
> it is a Collector on its own. It is a convenient, yet useful, class. Will 
> post a patch w/ it shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to