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 2016/08/15 16:25:55 UTC
[Solr Wiki] Update of "CollapsingQParserPlugin" by CassandraTargett
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 CassandraTargett:
https://wiki.apache.org/solr/CollapsingQParserPlugin?action=diff&rev1=9&rev2=10
Comment:
add migration note
- '''Solr 4.6'''
+ {{{#!wiki important
+ This page exists for the Solr Community to share Tips, Tricks, and Advice about
+ [[https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results|Collapsing Query Parser]].
+
+ Reference material previously located on this page has been migrated to the
+ [[https://cwiki.apache.org/solr/|Official Solr Reference Guide]].
+ If you need help, please consult the Reference Guide for the version of Solr you are using
+ for the specific details about using [[https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results|this feature]].
+
+ If you'd like to share information about how you use this feature, please [[FrontPage#How_to_edit_this_Wiki|add it to this page]].
+ /* cwikimigrated */
+ }}}
- 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:
-
- . 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:
-
- . fq={!collapse field=field_name max=field_name}
-
- 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)
-
- fq={!collapse field=field_name max=sum(cscore(),field(A))}
-
- 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.
-
- '''TODO''': Coming soon the ExpandComponent (SOLR-5270). The ExpandComponent expands the groups for a single page of results collapsed by the CollapsingQParserPlugin.
-