[ 
https://issues.apache.org/jira/browse/LUCENE-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Woody Anderson updated LUCENE-2542:
-----------------------------------

    Attachment: LUCENE_3.0.2-2542.patch

I'm providing this patch in case you want to have this fix for 3.0.2 based 
lucene branch. It breaks the back compatibility test, b/c i changed the 
'meaning' of TopDocsCollector. You could probably introduce a new class that is 
a superclass of TDC, but that makes code/files less readable and less 
representative.
So, since few people are probably patching 3.0.2 in this case anyway, it's here 
only for those few want that. There will be another patch for 4.0 release 
target, where the back compatibility is not enforced.

> TopDocsCollector should be abstract super class that is the real 
> "TopDocsCollector" contract, a subclass should implement the priority-queue 
> logic. e.g. PQTopDocsCollector
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2542
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2542
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 3.0.2
>            Reporter: Woody Anderson
>             Fix For: 4.0
>
>         Attachments: LUCENE_3.0.2-2542.patch
>
>
> TopDocsCollector is both an abstract interface for producing TopDocs as well 
> as a PriorityQueue based implementation.
> Not all Collectors that could produce TopDocs must use a PriorityQueue, and 
> it would be advantageous to allow the TopDocsCollector to be an "interface" 
> type abstract class, with a PQTopDocsCollector sub-class.
> While doing this, it'd be good to clean up the generics uses in these 
> classes. As it's odd to create a TopFieldCollector and have to case the 
> TopDocs object, when this can be fixed with generics.

-- 
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