An ORM-like query API for Elasticsearch that simplifies index management, document CRUD, and complex query building. Current stable version is 1.0.29. Provides a fluent query builder with support for term, match, must/should/not conditions, aggregations, pagination, and more. Key differentiators include minimal configuration, built-in index synchronization, and support for geo points. The package appears to be in an early stage with limited community adoption and maintenance.
npm install elasticsearch-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to Elasticsearch, registers an index with mappings and settings, synchronizes, creates a document, and retrieves it.
Use instance.on('connected', ...) instead of instance.on('connect', ...).Use try/catch when calling get, or check existence via exists() before get().
Consider migrating to @elastic/elasticsearch (v7+) and using a different ORM that supports the new client.
Always call .query() at the end of a query chain, e.g., instance.term('age',12).query()Follow the exact parameter order: body, id (optional), routing (optional), options (optional).
Use require('elasticsearch-orm') instead of import.Use exists() method first, or wrap get() in a try/catch.
Use const Condition = require('elasticsearch-orm').Condition;