{"id":43730,"library":"query-orm-connector-elastic","title":"Query ORM Elasticsearch Connector","description":"Elasticsearch 7.x connector for query-orm (v1.0.3). Enables use of Elasticsearch as a data source with the query-orm framework, supporting index management, mappings, aliases, and CRUD operations. Released as a standalone package requiring query-orm as a peer dependency. Differentiates from other Elasticsearch ORMs by integrating with query-orm's model-based abstraction and event-driven lifecycle. Low release cadence; last updated 2019.","status":"active","version":"1.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/bharathkontham/query-orm-connector-elastic","tags":["javascript","elasticsearch","query-orm","query","dsl","orm","loopback","odm"],"install":[{"cmd":"npm install query-orm-connector-elastic","lang":"bash","label":"npm"},{"cmd":"yarn add query-orm-connector-elastic","lang":"bash","label":"yarn"},{"cmd":"pnpm add query-orm-connector-elastic","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency — the connector is useless without the query-orm core framework.","package":"query-orm","optional":false}],"imports":[{"note":"Package uses CommonJS; ESM imports may fail in Node <14 unless using a bundler.","wrong":"import QueryORM from 'query-orm';","symbol":"QueryORM","correct":"const QueryORM = require('query-orm');"},{"note":"Do not require or import this package directly in application code. It is loaded automatically by query-orm based on datasource configuration.","wrong":"const connector = require('query-orm-connector-elastic');","symbol":"none","correct":"The connector is a plugin; no direct import from the package itself. The connector is specified in datasources.json."}],"quickstart":{"code":"const QueryORM = require('query-orm');\nconst path = require('path');\n\nconst app = new QueryORM({\n  appRoot: __dirname,\n  modelConfig: './model-config.json',\n  dataSources: './datasource.json'\n});\n\napp.on('model-init', (data) => {\n  console.log('Models initialized:', data);\n});\n\napp.on('error', (error) => {\n  console.error('App error:', error);\n});\n\nasync function run() {\n  const createdUser = await app.models.User.create({\n    firstname: 'Jane',\n    lastname: 'Doe',\n    username: 'janedoe',\n    password: 'Pass123!'\n  });\n  console.log('Created user:', createdUser);\n\n  const users = await app.models.User.find({\n    where: { username: 'janedoe' }\n  });\n  console.log('Found users:', users);\n}\n\nrun().catch(err => console.error(err));","lang":"javascript","description":"Connects to Elasticsearch via query-orm, defines a User model, creates a user, and queries by username."},"warnings":[{"fix":"Use Elasticsearch 7.x cluster or upgrade connector if newer version available.","message":"Elasticsearch version compatibility: v7 only. Does not support ES 6.x or 8.x.","severity":"breaking","affected_versions":"all"},{"fix":"Ensure both query-orm and query-orm-connector-elastic are installed, and datasources.json includes 'connector': 'query-orm-connector-elastic'.","message":"The connector is not imported directly; it must be installed and referenced in datasources.json. Failing this will result in missing connector error.","severity":"gotcha","affected_versions":"all"},{"fix":"No official migration path. Consider using a more modern connector or custom integration.","message":"The package uses the elasticsearch npm client (deprecated). The @elastic/elasticsearch client is the recommended replacement.","severity":"deprecated","affected_versions":"all"},{"fix":"Provide proper CA certificate or secure connection in production.","message":"SSL configuration: setting rejectUnauthorized: false disables certificate validation. Not recommended for production.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2019':75 '7':6 'abstract':64 'alias':32 'base':63 'cadenc':72 'connector':4,8 'crud':34 'data':20 'depend':48 'differenti':49 'driven':68 'dsl':82 'elasticsearch':3,5,17,52,77 'enabl':14 'event':67 'event-driven':66 'framework':27 'index':29 'integr':55 'javascript':76 'last':73 'lifecycl':69 'loopback':84 'low':70 'manag':30 'map':31 'model':62 'model-bas':61 'odm':85 'oper':35 'orm':2,12,26,44,53,59,80,83 'packag':40 'peer':47 'queri':1,11,25,43,58,79,81 'query-orm':10,24,42,57,78 'releas':36,71 'requir':41 'sourc':21 'standalon':39 'support':28 'updat':74 'use':15 'v1.0.3':13 'x':7","created_at":"2026-06-05T17:01:12.729982+00:00","updated_at":"2026-06-05T17:01:12.729982+00:00","problems":[{"fix":"npm install query-orm","cause":"query-orm is not installed; it is a required peer dependency.","error":"Error: Cannot find module 'query-orm'"},{"fix":"npm install query-orm-connector-elastic and ensure datasources.json has the correct connector name.","cause":"The connector package is not installed or not properly configured in datasources.json.","error":"Error: The connector query-orm-connector-elastic is not registered."},{"fix":"Check datasources.json > configuration > nodes for correct URL and port. Ensure Elasticsearch is running.","cause":"Elasticsearch cluster is not reachable or connection configuration is incorrect.","error":"ConnectionError: No Living connections"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/bharathkontham/query-orm-connector-elastic#readme","github":"https://github.com/bharathkontham/query-orm-connector-elastic","docs":null,"changelog":null,"pypi":null,"npm":"query-orm-connector-elastic","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}