Field collapsing has some aggregation functions like sum() and avg(), but the statistics are computed based on collapse groups instead of all documents with the same field value. A collapse group contains documents that were not relevant enough to end up (collapsed documents) in the search result and one or more documents that are relevant for the current search result, that are being displayed in the search result. This number is controlled by the collapse.threshold parameter, that defaults to one.
The statistics are calculated based on the collapsed documents, so it is not exactly the same as a sql group by. You can however get similar results when the collapse.threshold is one and add the field value (e.g. price) of the most relevant document to the aggregated statistic. Off course you will have to this yourself on the client side. Hope this clarifies the field collapse functionality a bit. Martijn 2009/12/4 Otis Gospodnetic <otis_gospodne...@yahoo.com>: > Not out of the box. You could "group by" using SOLR-236 perhaps? > > Otis > -- > Sematext -- http://sematext.com/ -- Solr - Lucene - Nutch > > > > ----- Original Message ---- >> From: Bruno <brun...@gmail.com> >> To: solr-user@lucene.apache.org >> Sent: Fri, December 4, 2009 1:08:59 PM >> Subject: Grouping >> >> Is there a way to make a group by or distinct query? >> >> -- >> Bruno Morelli Vargas >> Mail: brun...@gmail.com >> Msn: brun...@hotmail.com >> Icq: 165055101 >> Skype: morellibmv > >