Document enhancements in DocumentNodeStore in 1.6 - make content structure examples code blocks to avoid rendering as lists
@@ -50,11 +50,14 @@ entries indexed.
Bundling is enabled on per nodetype basis.
Bundling definitions are defined as content in the repository under `/jcr:system/rep:documentStore/bundlor`.
+~~~
+ < node type name >
- pattern - multi
+~~~
For example below content structure enables bundling for nodes of type `nt:file` and `app:Asset`
+~~~
+ jcr:system
+ rep:documentStore
+ bundlor
@@ -62,6 +65,7 @@ For example below content structure enables bundling for nodes of type `nt:file`
- pattern = ["jcr:content"]
+ app:Asset
- pattern = ["jcr:content/metadata", "jcr:content/renditions", "jcr:content"]
+~~~
Once this is done any node of type `nt:file` created _after_ this will be stored
in bundled format. Nodes created _before_ the configuration was added are not
@@ -106,6 +110,7 @@ paths 'jcr:content/renditions'
Lets take an example of `nt:file` node like below
+~~~
+ /content/book.jpg
- jcr:createdBy = "admin"
- jcr:primaryType = "nt:file"
@@ -115,6 +120,7 @@ Lets take an example of `nt:file` node like below
- jcr:uuid = "56befaee-f5fe-4252-87f8-0dcc8a624dd5"
- jcr:lastModifiedBy = "admin"
- jcr:primaryType = "nt:resource"
+~~~
![Bundling Nodes](node-bundling-file.png)
@@ -148,11 +154,13 @@ This JCR node structure would be stored in MongoDB in 2 documents
Now with bundling pattern like
+~~~
+ jcr:system
+ rep:documentStore
+ bundlor
+ nt:file (oak:Unstructured)
- pattern = ["jcr:content"]
+~~~
Would bundle the 2 nodes in nt:file node structure in same MongoDB Document
@@ -184,6 +192,7 @@ instead of 20M (without bundling)
Lets take a more complex content structure. Assume a nodetype `app:Asset` having following content
+~~~
/content/banner.png
- jcr:primaryType = "app:Asset"
+ jcr:content
@@ -199,6 +208,7 @@ Lets take a more complex content structure. Assume a nodetype `app:Asset` having
+ jcr:content
- jcr:data = ...
+ comments (nt:folder)
+~~~
Above structure has following characteristics
@@ -213,6 +223,7 @@ Such a structure can make use of Node Bundling to reduce this storage ratio.
Lets define a bundling pattern like below
+~~~
+ jcr:system
+ rep:documentStore
+ bundlor
@@ -220,6 +231,7 @@ Lets define a bundling pattern like below
- pattern = ["jcr:content"]
+ app:Asset
- pattern = ["jcr:content/metadata", "jcr:content/renditions/**", "jcr:content"]
+~~~
With this bundling pattern same app:Asset structure would be stored in 1 MongoDB Document excluding 'comments' and 'xmp'
nodes
