Release v8.1.0
Preview: list and update for schema-based index documents (alpha)
⚠️ Alpha surface — allpc.preview.*APIs target the2026-01.alphaAPI version and are not covered by the SDK's backward-compatibility guarantee. Signatures may change before these operations graduate to stable.
This release rounds out the document operations on pc.preview.index(...) introduced in v8.0.0 with two new methods — listDocuments and updateDocuments — and adds an n-gram (substring) tokenizer option to full-text search fields.
Listing documents
listDocuments returns document IDs for a namespace, with support for prefix filtering, a result limit, and cursor-based pagination.
const index = pc.preview.index('my-schema-index');
// List document IDs (supports prefix, limit, and pagination)
const page = await index.listDocuments('my-namespace', { prefix: 'doc-', limit: 50 });
// { documents: [{ _id: 'doc-1' }, ...], pagination: { next: '...' }, namespace, usage }
// Fetch the next page using the returned cursor
const next = await index.listDocuments('my-namespace', {
paginationToken: page.pagination?.next,
});Updating documents
updateDocuments applies partial updates to existing documents by _id. Set new field values inline, or remove fields via _remove_fields. Unmentioned fields are left unchanged, and updates to a nonexistent document are accepted as a no-op.
await index.updateDocuments('my-namespace', {
documents: [
{ _id: 'doc-1', content: 'Updated content' }, // set a new value
{ _id: 'doc-2', _remove_fields: ['category'] }, // remove a field
],
});n-gram tokenizer for full-text search
Full-text search string fields now accept an ngram (substring) tokenizer in their fullTextSearch configuration, enabling substring matching. Note that ngram cannot be combined with stemming or stopWords.
await pc.preview.indexes.create({
name: 'my-schema-index',
schema: {
fields: {
chunk_text: {
type: 'string',
fullTextSearch: {
ngram: { minGram: 2, maxGram: 5 },
},
},
},
},
});What's Changed
- fix(ci): pin @types/node@20 in ts-compilation-test so TS 5.2-5.5 legs compile by @jhamon in #398
- Enable Dependabot version updates (PIN-4) by @jhamon in #393
- test(smoke): mocked critical-path gate that runs keyless on every PR by @jhamon in #395
- security: npm update to resolve js-yaml medium Dependabot alert (#45) by @jhamon in #394
- chore(deps): combine Dependabot minor/patch bumps (#403, #406, #407, #413, #414) by @austin-denoble in #415
- chore(deps): bump @typescript-eslint to ^8.64.0 (#411, #412) by @austin-denoble in #416
- chore(deps): bump jest + @types/jest to v30 (#405) by @austin-denoble in #417
- chore(deps): bump @types/node to 26.1.1 (#410) by @austin-denoble in #418
- chore(deps): bump eslint to v10 + migrate to flat config (#409) by @austin-denoble in #419
- Implement
listandupdatefor alpha preview operations by @austin-denoble in #392
Full Changelog: v8.0.0...v8.1.0