I implement a faceted search using Lucene. I have an index of documents and an index of a taxonomy. Then I collect facets for a given level of the taxonomy.
My question is: How can I get the number of documents indexed in a given Category of the Taxonomy?
I think that my question is quite simple but I couldn't find any method in the Lucene's API nor searching in Google. I only found how to get the number of documents in the whole index using the numDocs()
method of the IndexReader
class.