lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Schoy <>
Subject Re: Facet on a field with rows=n
Date Mon, 05 Dec 2011 13:58:30 GMT
Hi Kashif,

that is not possible in solr. The facets are always based on all the
documents matching the query.

But there is a workaround:
1) Do a normal query without facets (you only need to request doc ids
at this point)
2) Collect all the IDs of the documents returned
3) Do a second query for all fields and facets, adding a filter to
restrict result to those IDs collected in step 2.


2011/12/5 Kashif Khan <>:
> Hi all,
> i am looking for a solution where i want the facets to obtain based on the
> paging of solr documents.
> For ex:-
> say i hv a query *:* and set start=0 and rows=10 and then i want facets on
> any one of the fields in the 10 docs obtained and not on the entire docs for
> which the query was matched.
> Any intelligent people can solve my problem?
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message