[jira] Commented: (SOLR-1682) Implement CollapseComponent

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1682) Implement CollapseComponent

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886139#action_12886139 ]

Yonik Seeley commented on SOLR-1682:
------------------------------------

I've updated my phase1 collapsing to include an arbitrary sort, and fixed some bugs along the way.

I've been trying to understand the other patches here... but there are some interesting mysteries.

There are multiple occurrences of comparator code like this:
{code}
        if ((c < 0 && reverseMul[i] > 0) || (c > 0 && reverseMul[i] < 0)) {
{code}

but reverseMul has already been folded into "c", so a simple c<0 seems correct?

Also, looking at the second stage collapsing (CollapsedDocCollector) I think I see a number of issues:
 * the counts collected in the first phase may not be correct, but are used in the second phase
 * setBottom is used, but there really needs to be a bottom per group (actually, compareBottom is never used anyway)
 * the field comparator is used incorrectly... compare(doc,slot) is called, but that's actualy (slot1,slot2) so the results will be wrong (or throw an exception).

I'm surprised that any included tests passed given these apparent problems (unless I'm reading the code incorrectly).  I think we'll need some very good random tests for this functionality to be sure we're hitting all of the corner cases.

Anyway, I'm starting to implement the second phase collector with essentially a priority queue per group.

> Implement CollapseComponent
> ---------------------------
>
>                 Key: SOLR-1682
>                 URL: https://issues.apache.org/jira/browse/SOLR-1682
>             Project: Solr
>          Issue Type: Sub-task
>          Components: search
>            Reporter: Martijn van Groningen
>            Assignee: Shalin Shekhar Mangar
>             Fix For: Next
>
>         Attachments: field-collapsing.patch, SOLR-1682.patch, SOLR-1682.patch, SOLR-1682_prototype.patch, SOLR-1682_prototype.patch, SOLR-236.patch
>
>
> Child issue of SOLR-236. This issue is dedicated to field collapsing in general and all its code (CollapseComponent, DocumentCollapsers and CollapseCollectors). The main goal is the finalize the request parameters and response format.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]