elasticsearch-store (v2.11.1) is a TypeScript library for managing Elasticsearch indices with versioning and migration support. It provides a structured API to create, update, and migrate indices, ensuring schema evolution over time. Released under the Terascope organization, it targets Node.js >=22 and pnpm >=11.3. Key differentiators include built-in migration handling, type-safe index management, and integration with the Teraslice ecosystem. Maintained actively with a focus on reliability.
npm install elasticsearch-storeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes an IndexStore with client, defines mapping and version, creates index, indexes a document, and retrieves it.
Upgrade Node.js to v22+ and pnpm to v11.3+.
Ensure to call `store.migrate()` after `store.initialize()` if migrations are defined.
Pass client inside options as `{ client }`.Use `store.indexDocument<MyType>(doc)` to ensure type safety.
Use `import` syntax or dynamic `import()`.
Install @elastic/elasticsearch@8 or higher.
Add `mappings: { properties: {...} }` to configuration.Change to import statement or use dynamic import().