lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "FieldCollapsing" by ShalinMangar
Date Thu, 17 Dec 2009 12:38:41 GMT
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.


+ <!> [[Solr1.5]]
- = Field Collapsing =
- /!\ This referes to functionality from [[|SOLR-236]]]
- This patch is not complete, but it will be useful to keep this page updated while the interface
+ <<TableOfContents>>
- From [[|fast search]]]
+ /!\ This page refers to functionality from [[|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 [[|fast search]] (TODO: this
link is broken, fix it)
  This topic was discussed a while ago:
- == 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
- == 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:
   * [[|Result
grouping / field collapsing with Solr]]

View raw message