Skip to content

v0.26.0 - MongoDB-compatible subset and unified text search

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Nov 21:29

v0.26.0 - MongoDB-compatible subset and unified text search

NonoDB 0.26.0 adds a documented MongoDB-compatible wire subset for official
drivers, MongoDB-style text indexes with $text, a unified search-index
definition, and a broad set of query, aggregation, indexing, and operational
hardening changes.

This release targets applications that use ordinary MongoDB driver CRUD,
cursors, indexes, and basic aggregation. It is not full MongoDB parity:
sessions, multi-document transactions, change streams, collation, $where,
MongoDB $search/Atlas Search, full mongosh, Compass, and BI connectors
remain out of scope. Unsupported commands and options fail loudly instead of
being silently ignored.

Highlights

  • MongoDB-compatible wire endpoint for PyMongo, Node.js, and Go drivers:
    handshake, CRUD, cursors, count, distinct, aggregation, index and collection
    DDL, dropDatabase, SCRAM-SHA-256/SHA-1, TLS, and authSource validation.
  • MongoDB-style text indexes and $text with multi-field weighted BM25,
    positive terms and phrases, negative clauses, $meta: "textScore", and text
    index DDL through createIndexes/listIndexes/dropIndexes.
  • Unified search-index definitions shared by native text search, native
    fuzzy search, and MongoDB $text, with weighted multi-field definitions and
    replication support.
  • BSON compatibility improvements: ObjectId _id for driver-created
    documents and wire upserts, Timestamp/MinKey/MaxKey, non-finite Decimal128,
    and BSON regex values as read predicates.
  • Direction-aware indexes: MongoDB-style index names and key directions,
    mixed ascending/descending compound indexes, sorted queries, and unique
    lookups.
  • Wire correctness and safety: aggregate cursor batching and getMore,
    strict rejection of unsupported driver options, read/write concern validation,
    list filter support, principal-scoped authorization, connection limits, and
    handshake/read/write timeouts.
  • MongoDB tooling and conformance: mongoexport, mongodump, bsondump,
    mongoimport, and mongorestore --nsFrom/--nsTo checks; conformance tests
    against a real MongoDB server; Node.js and Go driver tests; and a static
    MongoDB portability checker.
  • Query and aggregation compatibility expanded with pipeline updates,
    $lookup variables and nested lookups, unionWith, graphLookup,
    setWindowFields, densify, fill, date expressions, index hints,
    comment, maxTimeMS, and nested positional/meta projections.
  • Operational hardening: request latency histograms, online resize and
    crash recovery coverage, a 10M-document campaign, and MongoDB wire connection
    limits/timeouts.

Breaking changes and upgrade notes

  • Search-index metadata changed. Text and fuzzy index definitions are now
    stored as unified SearchIndexDef records. Old text:/fuzzy: definition
    keys are not migrated automatically.
    • Drop and recreate native text/fuzzy indexes after upgrading.
    • MongoDB-style text indexes should be recreated as well if the data directory
      came from an older development build.
    • reindex now preserves full multi-field definitions, including field
      weights, and is the preferred rebuild path for existing unified indexes.
  • MongoDB wire writes without an explicit _id use ObjectId; the HTTP/core
    path keeps UUID v4 defaults.
  • Stored BSON regex values remain unsupported. Driver regex literals are
    accepted as read filters; writes that try to store a regex value fail with
    BadValue (code 2).
  • MongoDB wire support remains an optional listener controlled by
    NONODB_MONGO_ADDR; the HTTP/JSON API remains the native interface.

MongoDB compatibility notes

  • One global SCRAM credential and one listener-level principal scope per wire
    listener; there is no MongoDB user database, per-database users/roles, X.509
    username mapping, or replica-set URI support.
  • Vault headers (X-NonoDB-Tenant, X-NonoDB-Key-Id, X-NonoDB-Key) cannot be
    carried by a MongoDB driver. Use the native client/HTTP API for vault
    collections; a plain tenant_id field is indexed data, not encryption.
  • $text is a deliberately lexical BM25 subset: no stemming, no stop words, and
    only default_language absent or "none". It is supported in find,
    count, distinct, and a leading aggregate $match; maxTimeMS with
    $text is rejected.
  • BM25 remains expensive for very frequent terms over a large text index. A
    10M-document / 1M-text-document run measured a frequent-term p50 of about
    9.2 s. Optimization of large postings is tracked as a follow-up.
  • Java is not in the automated driver matrix. PyMongo, Node.js, and Go are.

Configuration

MongoDB wire settings are opt-in. Relevant variables include:

  • NONODB_MONGO_ADDR, NONODB_MONGO_USERNAME, NONODB_MONGO_PASSWORD
  • NONODB_MONGO_AUTH_MECHANISM, NONODB_MONGO_AUTH_SOURCE,
    NONODB_MONGO_PRINCIPAL
  • NONODB_MONGO_TLS_CERT, NONODB_MONGO_TLS_KEY
  • NONODB_MONGO_MAX_CONNECTIONS
  • NONODB_MONGO_READ_TIMEOUT_SECS, NONODB_MONGO_WRITE_TIMEOUT_SECS,
    NONODB_MONGO_HANDSHAKE_TIMEOUT_SECS

See docs/operations.md and docs/mongodb-compatibility.md for the full
contract and defaults.

Validation performed

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • MongoDB wire conformance against a real MongoDB 8.x server
  • Official PyMongo, Node.js, and Go driver checks
  • mongoexport/mongodump/mongoimport/mongorestore portability checks
  • MongoDB wire auth, connection-limit, and timeout tests
  • Native search, fuzzy, vector, replication, backup, restore, durability,
    crash-recovery, multi-database, GUI, and security suites
  • 10M-document load/query/index campaign and a 10M-document crash test
  • Release build with --locked in GitHub Actions

LiveAPISec.com

LiveAPISec.com tests: passed

  • Scan: 6afb7249991a96d9890b5de0
  • Workflow run: 43957910184
  • Commit: 1c02981
  • Findings: 0 critical, 0 high, 0 medium, 9 low, 5 info (402 tests)
  • Report artifact: liveapisec-report

Assets

  • nonodb-v0.26.0-linux-x86_64.tar.gz
  • nonodb-v0.26.0-macos-x86_64.tar.gz
  • nonodb-v0.26.0-macos-arm64.tar.gz
  • nonodb-v0.26.0-windows-x86_64.zip
  • Matching .sha256 checksum files for each archive
  • GHCR images: ghcr.io/essmos/nonodb:0.26.0,
    ghcr.io/essmos/nonodb:0.26, and ghcr.io/essmos/nonodb:latest

Full changelog: v0.25.0...v0.26.0