So... IndexSearcher.search (the one that sorts by score) throws an EXC if numHits is 0... Maybe... we should do the same for the sort-by-field case?
I think IndexSearcher should not only throw the exception, in my opinion the create() method in TSDC and TFDC should also check this and throw the exception? A lot of people, also solr are instantiating the collectors themselves (although not recommeneded, because they dont know the correct booleans passed in).
+1 for TSDC and TFDC throw exception if hitcount <1
And, also make this new Collector that only counts hits? The exception message can then point users to this new Collector?
+1 to the new collector that simply counts. I have such a collector also sometimes in my code. Misusing TFDC or TSDC is wrong and uses too much resources.