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

Shai Erera commented on LUCENE-2215:
------------------------------------

I must admit I don't like throwing UOE. I imagine the naive user calling one of 
these and hit w/ UOE out of nowhere really :). Perhaps it's a sign 
PagingCollector should not be a sub-class of TopDocsCollector? It does not 
benefit from it in any way because it overrides all the main methods, impls 
them or throws UOE for those it doesn't like. So perhaps it should just be a 
TopScorePagingCollector which copies some of the functionality of TSDC, but is 
not a TDC itself. It will have a topDocs() method, and only it (b/c I agree the 
rest don't make any sense).

Notice the different name I propose - to make it clear it's a collector that 
can be used for paging through a scored list of results.

I BTW liked that the if/else clauses were separated, b/c you could include 
meaningful documentation for each. Right now those are just very long lines.

About in-order, I think the only thing you will save is the last 'else'. Read 
my comment above about wrapping TSDC ... not sure about it, but it will make it 
more elegant.

I'll review the rest of the patch. Didn't yet understand what's PagingIterable 
for ...

> paging collector
> ----------------
>
>                 Key: LUCENE-2215
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2215
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>    Affects Versions: 2.4, 3.0
>            Reporter: Adam Heinz
>            Assignee: Grant Ingersoll
>            Priority: Minor
>         Attachments: IterablePaging.java, LUCENE-2215.patch, 
> PagingCollector.java, TestingPagingCollector.java
>
>
> http://issues.apache.org/jira/browse/LUCENE-2127?focusedCommentId=12796898&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12796898
> Somebody assign this to Aaron McCurry and we'll see if we can get enough 
> votes on this issue to convince him to upload his patch.  :)

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to