lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Sebastien Vachon <>
Subject Facet.query and collapsing
Date Thu, 25 Nov 2010 20:22:56 GMT

Hi All,

I'm in a situation where I need to perform a facet on a query with field collapsing.

Let's say the main query is something like this

title:apple&fq={!tag=sources}source_id:(33 OR 44)&facet=on&facet.field={!ex=sources}source_id&facet.query=source_id:(33
OR 44)&collapse=on&collapse.field=hash_id

I'd like my facet query to return the number of unique documents (based on the hash_id field)
that are associated to either source 33 or 44

Right now, the query works but the count returned is larger than expected since there is no
collapsing performed on the facet query's result set.

Is there any way of doing this? I'd like to be able to do this without performing a second


NOTE: I'm using Solr 1.4.1 with patch 236 (

View raw message