I need to show total documents count for each category in my search results...for example: Rock(1010) Blues(5030) Pop(2209) : :
I was reading somewhere that using TopFieldDocCollector is more efficient than HitCollector class.
Given my requirement, how do I use TopFieldDocCollector class?or is there any other approach in Lucene?