I think you'll need to use tags and exclusions in your query:

http://localhost:8983/solr/select?facet=true&facet.mincount=1&q=*:*&facet.fi
eld={!ex%3Dcolor}color&fq={!tag%3Dcolor}color:("Yellow")

In this query, I'm filtering by the color Yellow, but I'm retrieving facet
counts for colors without constraining the facet counts of color.

This screencast explains this pretty well:
http://www.lucidimagination.com/solutions/webcasts/faceting

-Michael

On 11/24/10 9:57 AM, "Petrov Sergey" <geoco...@yandex.ua> wrote:

> I need to retrieve result of query and facet counts for all searchable
> document fields. I can't get correct results in case when facets counts are
> calculated for field that is in search query. Facet counts are calculated to
> match the whole query, but for this field I need to get values, that are
> constrained by all query params except of query on current field (so facet
> values must to be constrained by all query values except of current field
> itself). 
> Variant with performing one full query plus as many queries, as is the count
> of search fields, gives me what I need, but I think that there must be a
> better way to solve this problem.
> P.S. Sorry for my English.


Reply via email to