Package org.apache.lucene.search
Class DocIdStream
java.lang.Object
org.apache.lucene.search.DocIdStream
A stream of doc IDs. Most methods on
DocIdStream
s are terminal, meaning that the DocIdStream
may not be further used.- See Also:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Sole constructor, for invocation by sub classes. -
Method Summary
Modifier and TypeMethodDescriptionint
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.
-
Constructor Details
-
DocIdStream
protected DocIdStream()Sole constructor, for invocation by sub classes.
-
-
Method Details
-
forEach
Iterate over doc IDs contained in this stream in order, calling the givenCheckedIntConsumer
on them. This is a terminal operation.- Throws:
IOException
-
count
Count the number of entries in this stream. This is a terminal operation.- Throws:
IOException
-