OK, maybe I'm finally getting it. When you do a facet.field=blahblah, you're
telling Solr to take all the documents that match the query, look in field
blahblah, and tally the documents that match _any_ value in the field. There's
no restriction at all on the _values_ that that tally is made for.

If I'm _finally_ understanding you, you only want tallys for the values in
your fq clause, have you considered facet queries?

facet.query=user:10&facet.query=user:3.... will give you the counts for all the
docs that match your query (q and fq clauses), but only return you the facets
for the indicated users. You can have as many facet.query clauses as you want.

Best
Erick

On Mon, Jul 16, 2012 at 4:00 AM, davidbougearel
<david.bougea...@smile-benelux.com> wrote:
> Ok i'm added the debug, there is the query from the response after executing
> query :
>
> facet=true,sort=publishingdate
> desc,debugQuery=true,facet.mincount=1,q=service:1 AND
> publicationstatus:LIVE,facet.field=pillar,wt=javabin,fq=(((pillar:10))),version=2}},response={numFound=2,start=0,docs=[SolrDocument[{uniquenumber=UniqueNumber1,
> name=Doc 1, publicationstatus=LIVE, service=1, servicename=service_1,
> pillar=[10], region=EU, regionname=Europe, documenttype=TRACKER,
> publishingdate=Sun Jul 15 09:03:32 CEST 2012, publishingyear=2012,
> teasersummary=Seo_Description, content=answer, creator=chandan, version=1,
> documentinstanceid=1}], SolrDocument[{uniquenumber=UniqueNumber2, name=Doc
> 2, publicationstatus=LIVE, service=1, servicename=service_1, pillar=[10],
> region=EU, regionname=Europe, documenttype=TRACKER, publishingdate=Sat Jul
> 14 09:03:32 CEST 2012, publishingyear=2012, teasersummary=Seo_Description,
> content=answer, creator=chandan, version=1,
> documentinstanceid=1}]]},facet_counts={facet_queries={},facet_fields={pillar={10=2}},facet_dates={},facet_ranges={}},debug={rawquerystring=service:1
> AND publicationstatus:LIVE,querystring=service:1 AND
> publicationstatus:LIVE,parsedquery=+service:1
> +publicationstatus:LIVE,parsedquery_toString=+service:1
> +publicationstatus:LIVE,explain={UniqueNumber1=
> 1.2917422 = (MATCH) sum of:
>   0.7741482 = (MATCH) weight(service:1 in 0), product of:
>     0.7741482 = queryWeight(service:1), product of:
>       1.0 = idf(docFreq=4, maxDocs=5)
>       0.7741482 = queryNorm
>     1.0 = (MATCH) fieldWeight(service:1 in 0), product of:
>       1.0 = tf(termFreq(service:1)=1)
>       1.0 = idf(docFreq=4, maxDocs=5)
>       1.0 = fieldNorm(field=service, doc=0)
>   0.517594 = (MATCH) weight(publicationstatus:LIVE in 0), product of:
>     0.6330043 = queryWeight(publicationstatus:LIVE), product of:
>       0.81767845 = idf(docFreq=5, maxDocs=5)
>       0.7741482 = queryNorm
>     0.81767845 = (MATCH) fieldWeight(publicationstatus:LIVE in 0), product
> of:
>       1.0 = tf(termFreq(publicationstatus:LIVE)=1)
>       0.81767845 = idf(docFreq=5, maxDocs=5)
>       1.0 = fieldNorm(field=publicationstatus, doc=0)
> ,UniqueNumber2=
> 1.2917422 = (MATCH) sum of:
>   0.7741482 = (MATCH) weight(service:1 in 0), product of:
>     0.7741482 = queryWeight(service:1), product of:
>       1.0 = idf(docFreq=4, maxDocs=5)
>       0.7741482 = queryNorm
>     1.0 = (MATCH) fieldWeight(service:1 in 0), product of:
>       1.0 = tf(termFreq(service:1)=1)
>       1.0 = idf(docFreq=4, maxDocs=5)
>       1.0 = fieldNorm(field=service, doc=0)
>   0.517594 = (MATCH) weight(publicationstatus:LIVE in 0), product of:
>     0.6330043 = queryWeight(publicationstatus:LIVE), product of:
>       0.81767845 = idf(docFreq=5, maxDocs=5)
>       0.7741482 = queryNorm
>     0.81767845 = (MATCH) fieldWeight(publicationstatus:LIVE in 0), product
> of:
>       1.0 = tf(termFreq(publicationstatus:LIVE)=1)
>       0.81767845 = idf(docFreq=5, maxDocs=5)
>       1.0 = fieldNorm(field=publicationstatus, doc=0)
> },QParser=LuceneQParser,filter_queries=[(((pillar:10)))
>
> As you can see in this request i'm talking about pillar not about user.
>
> Thanks for all, David.
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solr-facet-multiple-constraint-tp3992974p3995215.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to