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 components (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:

Collapse based on the min value of a numeric field:

Collapse based on the max value of a numeric field:

Collapse based on the min/max value of a function. The new cscore() function can be used with the CollapsinqQParserPlugin to return the score of the current document being collapsed. (Solr 4.7)

Collapse with a null policy:

There are three null policies:

The CollapsingQParserPlugin fully supports the QueryElevationComponent.

TODO: Coming soon the ExpandComponent (SOLR-5270). The ExpandComponent expands the groups for a single page of results collapsed by the CollapsingQParserPlugin.

CollapsingQParserPlugin (last edited 2014-02-19 16:22:54 by JoelBernstein)