Facet fields and facet queries do not depend on each other. Both of them depend only on the query and filter queries applied.
For example, lets say you're searching for cars with a full text query "hybrid sedan" and the UI should show counts of each manufacturer of the car e.g. Honda - 20, Chevrolet - 10 etc. You also want to show how many cars in the result are priced between 10,000 to 20,000. In this case, you would execute a solr query like: q="hybrid sedan"&facet=true&facet.field=manufacturer&facet.query:price:[10000 TO 20000] Hope that helps. On 4/12/08, Norskog, Lance <[EMAIL PROTECTED]> wrote: > > Ok. > > I have a query that returns a set A. Doing a facet on field F gives me: > All values of F in the index given as count(*) > And these values can include 0. > > I add a facet query that returns B. The facet operation now returns > count(*) on only the values of F that are found in query B. > Query B is only used as a set, none of the counts in query B are used. > > Is this it? > > Thanks, > > > Lance > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yonik > Seeley > Sent: Friday, April 11, 2008 1:36 PM > To: solr-user@lucene.apache.org > Cc: Norskog, Lance > Subject: Re: Facet Query > > On Fri, Apr 11, 2008 at 4:32 PM, Lance Norskog <[EMAIL PROTECTED]> > wrote: > > What do facet queries do that is different from the regular query? > > What is a use case where I would use a facet.query in addition to the > regular query? > > It returns the number of documents that match the query AND the > facet.query. > > -Yonik > -- Regards, Shalin Shekhar Mangar.