Storage
Persist and load search index artifacts
Overview
Storage is where index artifacts are persisted and later loaded at runtime. Configure it through withPeam (Next.js) or the Peam CLI.
Selecting a store
Index stores define where Peam writes index artifacts and where the runtime reads them back. Use searchStore (Next.js) or --store (CLI) to choose an implementation.
Quick start (Next.js)
// next.config.ts
import withPeam from '@peam-ai/next';
export default withPeam({
searchStore: {
type: 'fileBased',
config: { indexPath: '.peam/index.json' },
},
})();Quick start (CLI)
peam \
--source fileBased --projectDir . --sourceDir dist \
--store fileBased --indexPath .peam/index.jsonNotes
withPeamuses a singlesearchStoreconfiguration at build time and runtime.- The CLI can export to multiple stores by repeating
--storewith different configs.