Content Repository

DBS - MongoDB

Updated: October 16, 2020

DBS (Document-Based Storage) allows storage of Nuxeo documents inside a document-oriented store, like MongoDB.


Basic Storage

When configured for use with MongoDB, each Nuxeo document is stored as a single MongoDB document.

A sample document could look like:

    "_id" : ObjectId("542e9bd23004722355960895"),
    "ecm:id" : "612d0632-e12a-4374-88de-d6bd005bdcdc",
    "ecm:parentId" : "399afabc-1eb5-4650-9049-b59d6da8d989",
    "ecm:primaryType" : "Workspace",
    "ecm:name" : "Records",
    "ecm:lifeCyclePolicy" : "default",
    "ecm:lifeCycleState" : "project",
    "ecm:majorVersion" : NumberLong(0),
    "ecm:minorVersion" : NumberLong(0),
    "ecm:acp" : [
            "name" : "local",
            "acl" : [
                    "grant" : true,
                    "perm" : "Everything",
                    "user" : "Administrator"
                    "grant" : true,
                    "perm" : "Read",
                    "user" : "members"
    "ecm:ancestorIds" : [
    "ecm:racl" : [
    "ecm:fulltextSimple" : "img folder green png administrator administrator records administrator records",
    "ecm:fulltextBinary" : "toto",
    "icon" : "/img/folder_green.png",
    "dc:title" : "Records",
    "dc:description" : "",
    "dc:created" : ISODate("2014-10-03T12:51:30.542Z"),
    "dc:creator" : "Administrator",
    "dc:modified" : ISODate("2014-10-03T12:51:30.542Z"),
    "dc:lastContributor" : "Administrator",
    "dc:contributors" : [
    "my:attachedFile" : {
        "vignettes" : [
                "content" : {
                    "length" : NumberLong(4),
                    "data" : "c30e7a7827dd9a8c9dd62af48e67c846",
                    "mime-type" : "plain/text",
                    "name" : "file.txt"
                "height" : NumberLong(0),
                "width" : NumberLong(0),
                "label" : "vignettelabel"
        "name" : "somename"

Schema Properties

For user-defined schemas (and regular Nuxeo schemas, like dublincore), properties are stored as you would expect in JSON:

  • regular properties directly (like dc:title)
  • list properties as lists (like dc:contributors)
  • complex properties as JSON sub-document (like my:attachedFile)
  • lists of complex properties as lists of JSON sub-documents (like my:attachedFile.vignettes)
  • binaries as a digest value (like my:attachedFile.vignettes[0]

System Properties

A number of expected system properties are also present: ecm:id, ecm:parentId, ecm:name, ecm:posecm:primaryType, ecm:majorVersion, etc. You'll find a full list as constants in the DBSDocument class.

The ecm:acp complex property represents the ACP defined on the document.

There are also some fulltext-related properties: ecm:fulltextSimple and ecm:fulltextBinary, which are tied to a MongoDB text index.

A few system properties are computed from others in order to get efficient subtree searches and efficient security checks. They are:

  • ecm:ancestorIds: the list of ancestors for the document
  • ecm:racl: the list of identities having read access to the document


Proxies cannot be queried and retrieved with a JOIN (contrary to VCS), so they are stored as copies of the documents they point to, and are updated every time their target changes. In order to do this, some properties are maintained on proxies and proxy targets:

  • ecm:proxyTargetId: the target of the proxy

  • ecm:proxyIds: the proxies that target this document

Storage Restrictions

Due to the nature of the MongoDB storage, we use a transaction model equivalent to READ UNCOMMITTED, which means that a transaction may read data written but not yet committed by another transaction.

Full-text configuration is fixed to a default useful for evaluation (all textual fields and blobs are indexed), but a production instance should use Elasticsearch with a suitable full-text configuration.

Not Yet Implemented

The following features are planned for a later Nuxeo version but are not implemented in Nuxeo Platform 6.0:

  • binary storage configuration is fixed to the default binary storage (filesystem) (NXP-17051),
  • tags aren't supported (NXP-17670),
  • document locking is not completely atomic (NXP-17671),
  • transaction rollback is not supported (NXP-17672).



Related Documentation

We'd love to hear your thoughts!

All fields required