Lucene sometimes collects ranges of doc IDs at once via LeafCollector#collectRange. In particular this is used when there are no deletes, scores are not needed and the query is one of the following:
- a
MatchAllDocsQuery
- or a conjunctive query where all clauses are dense and report matching the same long runs of doc IDs (see
DocIdSetIterator#docIDRunEnd)
The second case is expected to kick in with LogsDB thanks to its index sort.
LuceneSourceOperator could then produce a block of doc IDs that would not even need to be materialized as an int[]?