Hi, David.

In this case it looks like you're looking for the faceting functionality. You can read more about this on the wiki, here:
http://wiki.apache.org/solr/SimpleFacetParameters?highlight=%28facet%29

In your case, you're going to want something like:

http://yoursolr.com/solr/select?q=colour:red&facet=true&facet.field=model

(You can also add a &rows=0 if you want to just see the facets, while you're trying to get things working.)

Hope this helps!

Bess


On 25-Sep-08, at 7:09 PM, Choi, David wrote:

Hi everyone, I tried looking in the mailing list archive, but couldn't find a good answer for what I'm trying to do.

Say I have an index of data about cars. I want to search for all red cars, so I do something like: q=colour:red. This returns 100 results, of which 40 are "model:Toyota", 30 are "model:Chrysler", and 30 are "model:Ford". How can I get the count of each type of car, without doing 3 separate queries?

Thanks in advance!
- David Choi


Reply via email to