search

Collector.collect(int) is called for every matching
document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the
matching documents. The high-level search API (Searcher.search(Query, Filter, int)) is usually more efficient, as it skips
non-high-scoring hits.