fetchNext-KorAPQuery-method: Fetch the next bunch of results of a KorAP query.

fetchNext,KorAPQuery-methodR Documentation

Fetch the next bunch of results of a KorAP query.

Description

fetchNext fetches the next bunch of results of a KorAP query.

Usage

## S4 method for signature 'KorAPQuery'
fetchNext(
  kqo,
  offset = kqo@nextStartIndex,
  maxFetch = maxResultsPerPage,
  verbose = kqo@korapConnection@verbose,
  randomizePageOrder = FALSE,
  preserveMetadataValues = NULL
)

## S4 method for signature 'data.frame'
fetchNext(kqo, ..., verbose = NULL)

Arguments

kqo

object obtained from corpusQuery()

offset

start offset for query results to fetch

maxFetch

maximum number of query results to fetch

verbose

print progress information if true

randomizePageOrder

fetch result pages in pseudo random order if true. Use set.seed() to set seed for reproducible results.

preserveMetadataValues

Preserve list-valued metadata from the fields API instead of joining multiple values with spaces. Useful when an analysis needs to distinguish multivalued categories. Defaults to the mode recorded by a previous fetch, or FALSE for an unfetched query. To change modes, restart retrieval with fetchAll().

...

Further fetch arguments applied to each query in a multi-query result.

Value

The kqo input object with updated slots collectedMatches, apiResponse, nextStartIndex, hasMoreMatches With preserveMetadataValues = TRUE, metadata columns with at most one value per match are atomic vectors (missing values become NA). Truly multivalued columns remain lists; a later page may introduce multiple values and promote a previously scalar column to a list.

References

https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026

See Also

Other corpus search functions: corpusQuery,KorAPConnection-method, fetchAll,KorAPQuery-method, fetchAnnotations,KorAPQuery-method

Examples

## Not run: 

q <- KorAPConnection() |>
  corpusQuery("Ameisenplage") |>
  fetchNext()
q@collectedMatches

## End(Not run)


RKorAPClient documentation built on Nov. 12, 2026, 5:11 p.m.