You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/10/24 21:30:37 UTC

[Solr Wiki] Update of "CollapsingQParserPlugin" by JoelBernstein

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "CollapsingQParserPlugin" page has been changed by JoelBernstein:
https://wiki.apache.org/solr/CollapsingQParserPlugin

New page:
 .
 . '''Solr 4.6'''
 .
 . 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.
 .
 . The CollapsingQParserPlugin collapses the result set to a single document per group before it forwards the result set to the rest of the search components. So all downstream compoments (faceting etc...) will work with the collapsed result set.
 .
 . The CollapsingQParserPlugin has a lean set of features that allow the CollapsingQParserPlugin to perform well with millions of distinct groups in the result set.
 . '''Sample syntax:'''
 .
 . Collapse based on the highest scoring document:
 .
 . fq=(!collapse field=field_name}
 . Collapse based on the min value of a numeric field:
 .
 . fq={!collapse field=field_name min=field_name}
 .
 . Collapse based on the max value of a numeric field:
 .
 . q={!collapse field=field_name max=field_name}
 .
 . Collapse with a null policy:
 .
 . fq={!collapse field=field_name nullPolicy=nullPolicy}
 .
 . 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 fully supports the QueryElevationComponent.<<BR>>
 . '''TODO''': Currently there is no way to expand the groups for a page of results. In the future there will be an Expand search component that will expand the groups for a page of collapsed results.