You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2009/12/17 13:38:41 UTC

[Solr Wiki] Update of "FieldCollapsing" by ShalinMangar

Dear Wiki user,

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

The "FieldCollapsing" page has been changed by ShalinMangar.
The comment on this change is: Reorganized.
http://wiki.apache.org/solr/FieldCollapsing?action=diff&rev1=12&rev2=13

--------------------------------------------------

+ <!> [[Solr1.5]]
- = Field Collapsing =
- /!\ This referes to functionality from [[https://issues.apache.org/jira/browse/SOLR-236|SOLR-236]]]
  
- This patch is not complete, but it will be useful to keep this page updated while the interface evolves.
+ <<TableOfContents>>
  
- From [[http://www.fastsearch.com/glossary.aspx?m=48&amid=299|fast search]]]
+ /!\ This page refers to functionality from [[https://issues.apache.org/jira/browse/SOLR-236|SOLR-236]]. It is not yet available in trunk.
+ 
+ = Introduction =
  
  {{{
  "Used in order to collapse a group of results with similar value for a given field to a single entry in the result set. Site collapsing is a special case of this, where all results for a given web site is collapsed into one or two entries in the result set, typically with an associated "more documents from this site" link. See also Duplicate detection."
  }}}
+ From [[http://www.fastsearch.com/glossary.aspx?m=48&amid=299|fast search]] (TODO: this link is broken, fix it)
+ 
  This topic was discussed a while ago: http://www.nabble.com/result-grouping--tf2910425.html#a8131895
  
- == Setup ==
+ = Setup =
  The easiest way to configure field collapsing is by overriding the query component. This can be achieved by adding the following xml in your solrconfig.xml:
  
  {{{
@@ -61, +64 @@

  
  If the field collapse cache is not configured then the field collapse logic will not be cached. 
  
- == Parameters ==
+ <<Anchor(parameters)>>
+ = Request Parameters =
  ||'''param''' ||'''description''' ||
- ||collapse.type ||normal/adjacent -- does this collapse all fields or just the ones that are next to each other.  Defaults to normal ||
+ ||collapse.type ||normal/adjacent -- does this collapse all documents or just the ones that are next to each other.  Defaults to normal ||
  ||collapse.field ||Which field to collapse. If this field is not specified then field collapsing is not enabled and falls back to to the QueryComponent to do a search. ||
  ||collapse.facet ||before/after -- apply faceting before or after collapsing.  Defaults to after ||
  ||collapse.max ||Deprecated use collapse.threshold instead. This parameter is removed in the latest patch. ||
@@ -75, +79 @@

  ||collapse.debug ||wheter to include collapse debug information ||
  ||collapse.aggregate ||Execute aggregate functions on the collapsed documents. The parameter expect the functions in the following format: function_name(field_name) [, function_name(field_name]. So for example: sum(stock), avg(weight). Currently there are four functions available: min(...), max(...), sum(...), avg(...). The functionality is available from the patch added at 2009-10-25 10:13 PM. ||
  
- 
+ <<Anchor(examples)>>
- == Examples ==
+ = Examples =
  The latest patch has an improved response format. The first two examples are valid for patches before 2009-11-11 and the last example is valid for patches from that date.
  
  Using the example data:
@@ -131, +135 @@

  }}}
  The response is now centred around collapse groups. A collapse group represents documents that were collapsed during the search. A collapse group is identifier by the most relevant document of that collapse group, which is document that did not get collapsed and remained present in the search result. So the ids like 233238 are from documents that are also present in the search result.
  
- == Distributed field collapsing ==
+ = Distributed field collapsing =
  In a distributed environment fieldcollapsing is supported in a limited manner. While indexing you must make sure that the documents of a collapse group are not scattered across different shards. Documents of a collapse group must reside on the same shard, failing to do so will corrupt your search results. Doing a distributed search with collapsing requires not extra parameters to be send with the request. For example the following request is sufficient: http://localhost:8080/solr/select/?q=solr&field.collapse=my_field&shards=localhost:55527/solr,localhost:55529/solr
  
- == Other resources ==
+ = Other resources =
  Some other resources regarding to field collapsing:
  
   * [[http://blog.jteam.nl/2009/10/20/result-grouping-field-collapsing-with-solr/|Result grouping / field collapsing with Solr]]