You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Joel Bernstein (JIRA)" <ji...@apache.org> on 2013/10/07 14:44:45 UTC

[jira] [Comment Edited] (SOLR-5027) Result Set Collapse and Expand Plugins

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

Joel Bernstein edited comment on SOLR-5027 at 10/7/13 12:43 PM:
----------------------------------------------------------------

fq={!collapse field=student max=marks}

Will be similar to the sql statement that you want. But that is a little deceiving because only max and min are supported, other aggregation functions such as sum() are not. You could pair the CollapsingQParserPlugin with the stats component or in the future SOLR-5045 to do true aggregation. 

Note that solr field collasping/grouping can do similar functionality to this ticket and is available now. This ticket is still under development. 


was (Author: joel.bernstein):

fq={!collapse field=student max=marks}

Will be similar to the sql statement that you want. But that is a little deceiving because only max and min are supported, other aggregation functions such as sum() are not. You could pair the CollapsingQParserPlugin with the stats component or in the future SOLR-5045 to do true aggregation. 

> Result Set Collapse and Expand Plugins
> --------------------------------------
>
>                 Key: SOLR-5027
>                 URL: https://issues.apache.org/jira/browse/SOLR-5027
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: 5.0
>            Reporter: Joel Bernstein
>            Priority: Minor
>         Attachments: SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch
>
>
> This ticket introduces two new Solr plugins, the *CollapsingQParserPlugin* and the *ExpandComponent*.
> The *CollapsingQParserPlugin* is a PostFilter that performs field collapsing.
> Collapse based on the highest scoring document:
> {code}
> fq=(!collapse field=<field_name>}
> {code}
> Collapse based on the min value of a numeric field:
> {code}
> fq={!collapse field=<field_name> min=<field_name>}
> {code}
> Collapse based on the max value of a numeric field:
> {code}
> fq={!collapse field=<field_name> max=<field_name>}
> {code}
> Collapse with a null policy:
> {code}
> fq={!collapse field=<field_name> nullPolicy=<null_policy>}
> {code}
> There are three null policies:
> ignore : removes docs with a null value in the collapse field (default).
> expand : treats each doc with a null value in the collapse field as a separate group.
> collapse : collapses all docs with a null value into a single group using either highest score, or min/max.
> The *ExpandComponent* is a search component that takes the collapsed docList and expands the groups for a single page based on parameters provided.
> Initial syntax:
> expand=true   - Turns on the expand component.
> expand.field=<field> - Expands results for this field
> expand.limit=5 - Limits the documents for each expanded group.
> expand.sort=<sort spec> - The sort spec for the expanded documents. Default is score.
> expand.rows=500 - The max number of expanded results to bring back. Default is 500.
> *Note:* Recent patches don't contain the expand component. The July 16 patch does. This will be brought back in when the collapse is finished, or possible moved to it's own ticket.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org