lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Faceting on multiple fields, with multiple where clauses
Date Thu, 27 Oct 2011 12:45:37 GMT
You've got two q parameters.  For filtering on facet values, you're better off using fq parameters
instead (and if there is no other query, set q=*:*, or if using dismax set q.alt=*:* and leave
q empty/unspecified).  Only one q parameter is used, but any number of fq parameters may be


On Oct 27, 2011, at 08:09 , Rubinho wrote:

> hi,
> I have the following situation:
> - A dropdownlist to search trips by Country
> - A dropdownlist to search trips by departureperiod (range/month)
> I want to have facetresults on these fields.
> When i select a value in 1 of the dropdownlists, i receive the correct
> numbers (facets)
> If Country = "Belgium", then i receive the original number of trips per
> country and the number of trips per departuredate for Belgium.
> But, when i combine this search with a country and a departureperiod, then i
> expect to receive:
> - the number of trips per country in the selected departureperiod (for first
> dropdownlist)
> - the number of trips in the selected country (for second dropdownlist)
> But for some reason, i can't get the correct values when i combine these 2
> filters.
> I receive the correct number of trips/period, but the countries aren't
> filtered by this period anymore.
> Can somebody explain me what i'm doing wrong?
> This is the query for the combined search:
> http://localhost:8080/solr/select/?facet=true&{!ex=SD}StartDate&{!ex=CC}CountryCode&{!tag=CC}CountryCode:ID&q={!tag=SD}StartDate:[2011-11-01T00:00:00Z
> TO 2011-11-30T00:00:00Z]
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message