Package org.apache.lucene.search
Class DocIdStream
- java.lang.Object
-
- org.apache.lucene.search.DocIdStream
-
public abstract class DocIdStream extends Object
A stream of doc IDs. Most methods onDocIdStream
s are terminal, meaning that theDocIdStream
may not be further used.- See Also:
LeafCollector.collect(DocIdStream)
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DocIdStream()
Sole constructor, for invocation by sub classes.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
count()
Count the number of entries in this stream.abstract void
forEach(CheckedIntConsumer<IOException> consumer)
Iterate over doc IDs contained in this stream in order, calling the givenCheckedIntConsumer
on them.
-
-
-
Method Detail
-
forEach
public abstract void forEach(CheckedIntConsumer<IOException> consumer) throws IOException
Iterate over doc IDs contained in this stream in order, calling the givenCheckedIntConsumer
on them. This is a terminal operation.- Throws:
IOException
-
count
public int count() throws IOException
Count the number of entries in this stream. This is a terminal operation.- Throws:
IOException
-
-