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

[jira] [Commented] (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=13787909#comment-13787909 ] 

Prabha Satya commented on SOLR-5027:
------------------------------------

Hi Joel,
By the comments above I could make out that collapse plugin would allow us to do aggregations. But I am not sure whether this collapse plugin help me achieve something like this, I would express it in sql language for better understanding.

Schema:
=======
Student id 
subject
marks

Query:  
=====
Select subject,max(marks) from Student group by subject.

> 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