JCR Tree Model Restructuring in 15.3
Overview
This page describes the changes to the JCR tree model for taxonomy categories introduced in brXM version 15.3. The restructuring improves performance when working with large taxonomy trees.
Purpose
The restructuring addresses performance issues that occurred when editing and publishing large taxonomies. In previous versions, taxonomies with hundreds of categories and locale-specific fields (such as name, description, and synonyms) caused slow operations for editors.
JCR Tree Model Changes
Model Before 15.3
Prior to version 15.3, localized information for each category was stored in child nodes of type hippotaxonomy:categoryinfo under a hippotaxonomy:categoryinfos node. The structure was as follows:
/content/taxonomies/exampletaxonomy/exampletaxonomy: /mycategory: jcr:primaryType: hippotaxonomy:category hippotaxonomy:key: mycategory /hippotaxonmy:categoryinfos: jcr:primaryType: hippotaxonomy:categoryinfos /en: jcr:primaryType: hippotaxonomy:categoryinfo hippotaxonomy:name: My category hippotaxonomy:description: Description of my category hippotaxonomy:synonyms: [Synonym 1, Synonym 2] /nl: jcr:primaryType: hippotaxonomy:categoryinfo hippotaxonomy:name: Mijn categorie hippotaxonomy:description: Beschrijving van mijn categorie
Model From 15.3 Onward
Starting with version 15.3, localized information is stored directly as prefixed properties on the hippotaxonomy:category node. The updated structure is:
/content/taxonomies/exampletaxonomy/exampletaxonomy: /mycategory: jcr:primaryType: hippotaxonomy:category hippotaxonomy:key: mycategory locale.en.name: My category locale.en.description: Description of my category locale.en.synonyms: [Synonym 1, Synonym 2] locale.nl.name: Mijn categorie locale.nl.description: Beschrijving van mijn categorie
This approach reduces the number of nodes, resulting in fewer database records and queries. As a result, performance improves significantly for large taxonomies.
Upgrade Considerations
After upgrading to version 15.3, you are encouraged—but not required—to use the new tree model. Projects with small taxonomy trees may not experience performance issues and can continue using the previous structure.
Both the CMS and Delivery Tier support both the legacy and new models. You can also use a mixed approach, where some categories use locale properties and others use categoryinfo subnodes.
Automatic Conversion in the Taxonomy Editor
When you edit or add a category in the CMS, the system automatically converts the category to the new model. To migrate a small taxonomy, open each category in the taxonomy editor for all locales. After editing, publish the taxonomy to record the change in the revision history.
Groovy Updater Script
Version 15.3 includes a Groovy script named TaxonomyCategoryInfoOptimizer in the Updater Editor. This script visits all hippotaxonomy:categoryinfo nodes and moves their data to the parent category node using the new property format.
For large taxonomy trees, use this script to automate the migration. Note that running the script does not create entries in the revision history.
In testing with default settings, the script converted a taxonomy with approximately 800 categories and 4,000 subnodes in about 30 minutes.