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 2014/02/07 21:08:27 UTC

[jira] [Comment Edited] (SOLR-5027) Field Collapsing PostFilter

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

Joel Bernstein edited comment on SOLR-5027 at 2/7/14 8:08 PM:
--------------------------------------------------------------

Simon,

The "limit" on group size will be available in the expand component. You are correct that the CollapsingQParserPlugin only returns the one document per group and the Expand component will bring back the rest.

The initial functionality of the Expand component will return only group members that hit the query. We can iterate on this design to include a limiting filter query and also change the main query to allow retrieval of group members that were not in the original main query. If time allows I can try to get all this in the initial release but I'm shooting if possible to have this ready for Solr 4.7. Whatever doesn't make it in can be added in future releases.

The initial implementation of the expand component is being worked on in my GitHub fork:

https://github.com/joelbernstein2013/heliosearch/tree/expand

I'll be creating a jira ticket for this soon.

Joel






was (Author: joel.bernstein):
Simon,
Simon,

The "limit" on group size will be available in the expand component. You are correct that the CollapsingQParserPlugin only returns the one document per group and the Expand component will bring back the rest.

The initial functionality of the Expand component will return only group members that hit the query. We can iterate on this design to include a limiting filter query and also change the main query to allow retrieval of group members that were not in the original main query. If time allows I can try to get all this in the initial release but I'm shooting if possible to have this ready for Solr 4.7. Whatever doesn't make it in can be added in future releases.

The initial implementation of the expand component is being worked on in my GitHub fork:

https://github.com/joelbernstein2013/heliosearch/tree/expand

I'll be creating a jira ticket for this soon.

Joel





> Field Collapsing PostFilter
> ---------------------------
>
>                 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
>            Assignee: Joel Bernstein
>            Priority: Minor
>             Fix For: 4.6, 5.0
>
>         Attachments: SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch, SOLR-5027.patch
>
>
> This ticket introduces the *CollapsingQParserPlugin* 
> The *CollapsingQParserPlugin* is a PostFilter that performs field collapsing. This is a high performance alternative to standard Solr field collapsing (with *ngroups*) when the number of distinct groups in the result set is high.
> For example in one performance test, a search with 10 million full results and 1 million collapsed groups:
> Standard grouping with ngroups : 17 seconds.
> CollapsingQParserPlugin: 300 milli-seconds.
> Sample syntax:
> 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 CollapsingQParserPlugin also fully supports the QueryElevationComponent
> *Note:*  The July 16 patch also includes and ExpandComponent that expands the collapsed groups for the current search result page. This functionality will be moved to it's own ticket.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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