I'm working with the SearchFiles class in Lucene's contrib/demo directory. Rather than search for results in paginated form, I want to be retrieve all documents that match the query. Is there a way to do this with the existing API (3.4)? It seems like all the search functions require an integer indicating the amount of hits to return.
The demo code looks like
TopDocs results = searcher.search(query, 5 * hitsPerPage);
ScoreDoc its = results.scoreDocs;
Write your own
Collector and use it as
searcher.Search(query, new MyCollector());