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 martijn.
The comment on this change is: Added some defaults to parameters and added 
information about new response format.
http://wiki.apache.org/solr/FieldCollapsing?action=diff&rev1=7&rev2=8

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

  ||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 ||
- ||collapse.threshold ||The number of documents with the same value for 
collapse.field after which collapsing kicks in ||
+ ||collapse.threshold ||The number of documents with the same value for 
collapse.field after which collapsing kicks in. The default value is one. ||
- ||collapse.maxdocs ||Maximum number of documents to process during field 
collapsing ||
+ ||collapse.maxdocs ||Maximum number of documents to process during field 
collapsin. This parameter defaults to one greater then the largest document 
number. ||
  ||collapse.info.doc ||Return collapse count for each document? Defaults to 
true ||
  ||collapse.info.count ||Return collapse count for each field value? Defaults 
to true ||
  ||collapse.includeCollapsedDocs.fl ||Parameter indicating to return the 
collapsed documents in the response and what fields to return in comma 
separated manner. A value * indicates that all fields will be returned ||
@@ -60, +60 @@

  
  
  == 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:
  
  Collapse all documents using 'cat' and 'normal' collapse type:
@@ -85, +87 @@

   <int name="monitor">1</int>
  </lst>
  }}}
+ 
http://localhost:8983/solr/select/?q=*:*&collapse.field=cat&collapse.threshold=1&collapse.type=adjacent
+ 
+ {{{
+ <lst name="collapse_counts">
+     <str name="field">venue</str>
+     <lst name="results">
+         <lst name="233238">
+             <str name="fieldValue">hard</str>
+             <int name="collapseCount">1</int>
+         </lst>
+         <lst name="244438">
+             <str name="fieldValue">electronics</str>
+             <int name="collapseCount">1</int>
+         </lst>
+         <lst name="234658">
+             <str name="fieldValue">memory</str>
+             <int name="collapseCount">2</int>
+         </lst> 
+         <lst name="984338">
+             <str name="fieldValue">monitor</str>
+             <int name="collapseCount">1</int>
+         </lst> 
+     </lst>
+ </lst>
+ }}}
+ 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.
+ 
  == Other resources ==
  Some other resources regarding to field collapsing:
  

Reply via email to