Exposes, on demand, engines used by the MongoDB IntelliJ Plugin for index suggestions. This package provides programmatic access to the same query analysis and index suggestion engine used in the MongoDB IntelliJ IDE plugin. It analyzes MongoDB query patterns against sample documents and suggests optimal indexes to cover queries. Current version is 0.0.4. Release cadence is low. Key differentiator: it is the same engine used in the official MongoDB IntelliJ Plugin, so suggestions are production-tested. Alternatives require manual index design or third-party profilers.
npm install mongodb-mql-enginesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates the full pipeline: analyzeNamespace, parseQuery, and suggestIndex.
Pin to exact version (e.g., 'mongodb-mql-engines@0.0.4') and test upgrades.
Always await suggestIndex or chain .then().
Pass a shallow copy if original must remain unmodified.
Ensure first argument is an object with 'database' and 'collection' string properties.
Use const mql = require('mongodb-mql-engines') or wrap with createRequire for ESM.Wrap single query in an array: suggestIndex([myQuery]).