You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Simon Hu <si...@grainger.com> on 2008/10/01 03:42:40 UTC

Re: Question about facet.prefix usage

not really. facet.query filters the result set. Here we need to filter the
facet counts by multiple facet prefixes. facet.query would work only if the
faceted field is not a multi-value field. 



Erik Hatcher wrote:
> 
> If I'm not mistaken, doesn't facet.query accomplish what you want?
> 
> 	Erik
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-facet.prefix-usage-tp15836501p19753290.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Question about facet.prefix usage

Posted by Simon Hu <si...@grainger.com>.
You are right. I got it confused with fq (you can tell I am relative new to
solr :-) ). Thanks for the clarification.

Anyway, facet.query will not do the trick. I  wanted to do a facet count on
all values starting with more than one prefix in the same field. Doing
something like: 

f.field1.facet.prefix=patternA&f.field1.facet.prefix=patternB

the facet count in the result would look like the following:
<lst name="field1">
<int name="patternA xxx">7</int>
<int name="patternA yyy">1</int>
<int name="patternB zzz">2</int>
</lst>

Field values not starting with "patternA" or "patterB" will not be counted. 











Erik Hatcher wrote:
> 
> To be clear here, facet.query does not filter the result set at all.   
> It provides a count for how many documents in the current result set  
> (determined by q/fq parameters, oh, and bq sometimes too, doh! :)  
> match that query.
> 
> 	Erik
> 
> 
> 
> On Sep 30, 2008, at 9:42 PM, Simon Hu wrote:
> 
>>
>> not really. facet.query filters the result set. Here we need to  
>> filter the
>> facet counts by multiple facet prefixes. facet.query would work only  
>> if the
>> faceted field is not a multi-value field.
>>
>>
>>
>> Erik Hatcher wrote:
>>>
>>> If I'm not mistaken, doesn't facet.query accomplish what you want?
>>>
>>> 	Erik
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Question-about-facet.prefix-usage-tp15836501p19753290.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-facet.prefix-usage-tp15836501p19761563.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Question about facet.prefix usage

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
To be clear here, facet.query does not filter the result set at all.   
It provides a count for how many documents in the current result set  
(determined by q/fq parameters, oh, and bq sometimes too, doh! :)  
match that query.

	Erik



On Sep 30, 2008, at 9:42 PM, Simon Hu wrote:

>
> not really. facet.query filters the result set. Here we need to  
> filter the
> facet counts by multiple facet prefixes. facet.query would work only  
> if the
> faceted field is not a multi-value field.
>
>
>
> Erik Hatcher wrote:
>>
>> If I'm not mistaken, doesn't facet.query accomplish what you want?
>>
>> 	Erik
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Question-about-facet.prefix-usage-tp15836501p19753290.html
> Sent from the Solr - User mailing list archive at Nabble.com.