SearchResultItemIterator

An async iterator type that allows you to fetch SearchResultItem objects. An instance of this type is returned when calling ReaderDocumentSearchQuery.execute

Functions

Link copied to clipboard
abstract suspend fun next(): ColibrioResult<SearchResultItem?>

Takes the next item from this iterator. This method will return null if no more items are available.

Link copied to clipboard
abstract suspend fun take(numberOfItems: Int): ColibrioResult<List<SearchResultItem>>

Takes the specified number of items from this iterator. This method will return fewer items if no more are available.

Link copied to clipboard

Takes all remaining items from this iterator. In an "untouched" iterator, this is the same as taking all search result items. Note that this operation can be expensive since all ReaderDocuments will be processed.