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 "Ge, Yao (Y.)" <yg...@ford.com> on 2007/04/20 04:41:16 UTC

Facet.query

When mutiple facet queries are specified, are they booleaned as OR or
AND?
-Yao

Re: Facet.query

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Apr 19, 2007, at 10:41 PM, Ge, Yao ((Y.)) wrote:
> When mutiple facet queries are specified, are they booleaned as OR or
> AND?

Neither, if you're referring to &facet.query=...

facet.query's are all appended to the response, like this (in Ruby  
response format):

{
'responseHeader'=>{
   'status'=>0,
   'QTime'=>105,
   'params'=>{
	'wt'=>'ruby',
	'rows'=>'0',
	'facet.query'=>['ant',
	 'lucene'],
	'facet'=>'on',
	'indent'=>'on',
	'q'=>'erik hatcher'}},
'response'=>{'numFound'=>3,'start'=>0,'docs'=>[]
},
'facet_counts'=>{
   'facet_queries'=>{
	'ant'=>1,
	'lucene'=>1},
   'facet_fields'=>{}}}

The query was this:  ?q=erik% 
20hatcher&facet=on&facet.query=ant&facet.query=lucene&wt=ruby&indent=on& 
rows=0
on our library metadata which, pleasantly, has copies of both the Ant  
book (yes, I'm looking into that JUnit issue, Ryan and Yonik :) and  
the Lucene book.

If you mean the filter queries, &fq=... then those are logically  
ANDed when multiple are present.

	Erik