lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] Commented: (LUCENE-2215) paging collector
Date Tue, 23 Mar 2010 20:57:27 GMT


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

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:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>    Affects Versions: 2.4, 3.0
>            Reporter: Adam Heinz
>            Assignee: Grant Ingersoll
>            Priority: Minor
>         Attachments:, LUCENE-2215.patch,,
> 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:
For additional commands, e-mail:

View raw message