Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface ISearchResultItemIterator

    An async iterator type that allows you to fetch ISearchResultItem objects. An instance of this type is returned when calling IReaderDocumentSearchQuery.execute().

    interface ISearchResultItemIterator {
        take(numberOfItems: number): Promise<ISearchResultItem[]>;
        takeRemaining(): Promise<ISearchResultItem[]>;
    }

    Hierarchy

    Methods

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

      Example:

      const items = iterator.take(10);
      if (items.length < 10) {
      // End of iterator reached.
      }

      Parameters

      • numberOfItems: number

      Returns Promise<ISearchResultItem[]>

    • 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.

      Returns Promise<ISearchResultItem[]>