Excuse me. Some unchecked logic there concerning HitCollector. A
HitCollector hits all matching documents, not all documents. Sometimes
that can be a lot. With TopDocs, you only ask for the Top scoring
documents, which is usually a lesser number than all matching docs, and
generally what people
Their is definitely some stale javadoc in Lucene here and there. All of
what your talking about has been shaken up recently with the deprecation
of Hits. Hits used to pretty much be considered the non-expert API, but
its been tossed in favor of the TopDoc API's.
The HitCollector stuff has been
In fact, the search method used to populate the collector used in that
sample code also claims to be low level. It suggests using the
IndexSearcher.search( query ) method instead, but that method is deprecated.
Lower-level search API.
>
> HitCollector.collect(int,float) is called for every matchi