?
dataSources.allPassages
Walks every passage matching a filter, fetching pages behind the scenes.
DataSource.allPassages(filter?, { pageSize? }) → AsyncGenerator<DataSourcePassage>
An async iterator over passages. It fetches each page for you, so a for await loop reads every matching passage in turn. Each page counts against the search rate limit, so run a large walk in a background task, not in a request.
Parameters
filter
SearchFilter
Which passages to walk. Omit to walk the whole corpus.
pageSize
number
Passages fetched per page, at most 200 (the default).
Walk with for await
for await (const passage of Manuals.allPassages({ entities: ['P-1004A'] })) { mentions.push({ asset: 'P-1004A', ...passage.citation }); }