tags:

views:

616

answers:

2

Hi

I need to return only the facet counts from solr. So I basically want to search over all documents and return the facet counts, but I don't want to return any search results. Is this possible?

Thanks

+2  A: 

I guess the obvious solutiion would be to search using a wildcard and specify that you want zero results returned.

That's my solution so far.

Ryan
Returning zero results along with a wildcard on the id field is going to be the easiest.
Andrew Ingram
+1  A: 

Setting &facet=true will enable faceting and setting rows=0 will prevent any results being returned. Conviently the numFound will show you how many results were found.

nialloc