: currently i have to do 3 request for all three values of name, with passing
: "name" as fq parameter and given facet date range.

Got it, the example of what you are looking for makes perfect sense.

In general, faceting on the same field in different ways isn't supported 
(SOLR-1351 is an open issue for it but it needs a lot of tests/work to) 
but in your specific use case where all you want to change is the "base 
set" of documents (but keep all of the other facet options the same) then 
what you are looking for should be possible -- the key is to take 
advantage of the "tagging and excluding" option for ignoring certian fq 
values when faceting...

https://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters

Here is an example of what a request with taging and exclusions might look 
like on date faceting so that you get 3 different sets of date constraint 
counts for the same field/ranges, using different filters...

http://localhost:8983/solr/select?q=*:*&fq={!tag=fqa}inStock:true&fq={!tag=fqb}inStock:false&fq={!tag=fqc}popularity:6&facet=true&facet.range={!key=a%20ex=fqb,fqc}manufacturedate_dt&facet.range={!key=b%20ex=fqa,fqc}manufacturedate_dt&facet.range={!key=c%20ex=fqa,fqb}manufacturedate_dt&facet.range.gap=%2B1YEAR&facet.range.start=NOW/YEAR-10YEARS&facet.range.end=NOW/YEAR%2B1YEAR

...the caveat being that your main result set still has all of the filters 
applied (but it sounds like that doesn't matter for your usecase)

One final note...

: currently i have to do 3 request for all three values of name, with passing
: "name" as fq parameter and given facet date range.

...even if your real usecase is more complicated then the example you 
described, and can't be satisfied using taging & excluding filter queries, 
doing multiple requests to get this kind of info isn't as bad as it may 
sound: using http keep-alive will eliminat the overhead of th multiple 
GET requests and the filter cache will ensure that solr doesn't do 
unneccessary work computing the same document sets again in the second & 
third requests.


-Hoss

Reply via email to