I'd like to know how to perform a faceted search using lucene.facet. I'll explain exactly what I want to do: I've got a taxonomy of htmlfiles (similar to ODP) and I want that, given a query, display results by categories and number of hits per category. Is there any example describing that with lucene?
Edit: I already get results as categories by adding a category field in each document. What i want is that results appear as:
Cat1 N1
Cat2 N2
...
Instead of:
Cat1
Cat1
... xN1 times
Cat1
Cat2
... xN2 times
Cat2
...
Also, this category field only refers to a level of the taxonomy tree and I want to exploit the taxonomy structure by, for example, being able to select the depth of the search in the taxonomy (I don't know if this is clear..).
Thank you!