Workspaces configuration
Once a workspace is created, you can adjust the workspace configuration on a workspace-by-workspace basis. For each new workspace, there is a corresponding workspace.xml
file for fine tuning individual performance. By default, the file can be found on the file system inside the corresponding workspace folder.
To modify the configuration of an existing workspace, you need to change the workspace.xml file for that workspace. Changing the <Workspace/> element in the repository configuration file will not affect existing workspaces.
|
File system
The virtual file system passed to the persistence manager and search index.
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository" />
</FileSystem>
Jackrabbit provides a lot of choices for how you can configure the FileSystem
. Choose the class that best fits your use case.
Persistence manager
Each workspace in a Jackrabbit content repository uses separate persistence managers to store the content in that workspace.
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
</PersistenceManager>
Jackrabbit provides a lot of choices for how you can configure the PersistenceManager
. Choose the class that best fits your use case.
Search index
Node names and property values are indexed as soon as the data is saved or as soon as the transaction is committed.
Text extraction is done asynchronously in a in a background thread. That means text that is changed or added is not available immediately, but rather after a short delay. The exact behaviour can be configured using the extractor settings.
Jackrabbit provides the following options in the class SearchIndex
. All parameters (except path) have default values and can be omitted to use the default.
See Jackrabbit Search for more details. |
Basic configuration
Parameter | Description |
---|---|
|
required The location of the index directory. A reasonable value is: |
|
optional When not set all properties of a node are indexed. Magnolia provides a default indexing configuration file located in the Core module.
|
|
optional The name of the class that implements |
|
optional Sets the default analyzer in use for indexing. The default value is the This analyzer uses an English language stop word set. Lucene provides language specific analyzers which can be configured on a property-by-property basis in the indexing configuration file. |
|
optional The name of the class that implements |
|
optional Indicates whether the |
Performance
Indexing performance can be tuned with the following paramters.
For further performance ideas see Improve Indexing Speed in the Lucene documentation. |
Parameter | Description | ||
---|---|---|---|
|
optional All files belonging to a segment have the same name with varying extensions. When using the Compound File format these files are collapsed into a single .cfs file. Useful for systems that frequently run out of file handles.
|
||
|
optional This setting no longer exists in Lucene 3.x. |
||
|
optional The Lucene indexer does not write changes to the permanent index immediately. At first, indexer writes the changes to a volatile index. Once the volatile index reaches a certain size it is persisted to the permanent index. Also there is the option to set a timer, in seconds, to control how often changes are written. |
||
|
optional While merging segments, Lucene will ensure that no segment with more than maxMergeDocs is created. |
||
|
optional This value tells Lucene how many documents to store in memory before writing them to the disk, as well as how often to merge multiple segments together. With the default value of 10, Lucene will store 10 documents in memory before writing them to a single segment on the disk. |
||
|
optional Deprecated in Lucene 3.x. |
||
|
optional Maximum number of documents that are held in a pending queue until added to the index. |
||
|
optional Size of the document number cache. This cache maps UUIDs to lucene document numbers. If the doc number cache hits are poor then increasing this number could help. |
||
|
optional The maximum volatile index size in bytes until it is written to disk. The default value is 1MB. |
||
|
optional The maximum age (in seconds) of the index history. The default value is 0. Which means, index commits are deleted as soon as they are not used anymore. |
||
|
optional With the default value of true the hierarchy cache is initialized on startup and control is only given back when the initialization has completed. When set to false the cache is populated during regular use. |
Consistency
Repository consistency settings are covered in more detail in the Troubleshooting section here.
Parameter | Description |
---|---|
|
optional Runs a consistency check on every startup. If false, a consistency check is only performed when the search index detects a prior forced shutdown. When a consistency check is performed it can delay the start of the system. So this should only be run when a search index inconsistency is suspected. For example, a node not found error. A UUID exists in the search index but the corresponding node is not found. On the other hand, a node exists but is not recorded in the index. In both cases the index is inconsistent with the data. |
|
optional Errors detected by a consistency check are automatically repaired. If false, errors are only written to the log. |
|
optional If set |
|
optional The name of the class that implements |
Search
Parameter | Description |
---|---|
|
optional Class used to perform JCR Queries. |
|
optional If true and the query does not contain an |
|
optional The number of results the query handler should initially fetch when a query is executed. Keep in mind that ACL checks must be performed on the result set. The larger the set the more time to load and check. |
|
optional An |
Extraction
Parameter | Description |
---|---|
|
optional Defines the maximum number of background threads that are used to extract text from binary properties. If set to 0, then no background threads are allocated and text extractors run in the current thread. If you are using JR ver. 1.5 or better, then twice the number of available processors. |
|
optional A text extractor is executed using a background thread if it doesn’t finish within this timeout defined in milliseconds. This parameter has no effect if |
|
optional The size of the extractor pool back log. If all threads in the pool are busy, incoming work is put into a wait queue. If the wait queue reaches the back log size, incoming extractor work will not be queued anymore but will be executed with the current thread. |
|
optional Positive values are used as-is, negative values are interpreted as factors of the |
|
optional Java command used to fork external parser processes or null (the default) for in-process text extraction. Use this to better control system stability and reliability by forcing indexing of binary documents into separate JVM processes. Any problems caused by parsing large or malformed documents won’t affect the main process. |
Term identification
Parameter | Description |
---|---|
|
optional If set to |
|
optional The name of the class that implements |
Parsing
Parameter | Description |
---|---|
|
optional Deprecated in Jackrabbit 2.x. With Jackrabbit 2.x Apache Tika was introduced as the default binaries parser. By default Jackrabbit comes with a default |
|
optional Set the location of the |
Synonym provider
This allows users to use generalized language-dependent synonyms but more importantly very domain-specific synonyms like abbreviations or product names.
Parameter | Description |
---|---|
|
optional The name of a class that implements |
|
optional The path to the synonym provider configuration file. This path interpreted relative to the |
Spell checking
Parameter | Description |
---|---|
|
optional The name of a class that implements |
Scoring
Parameter | Description |
---|---|
|
optional The name of a class that extends |
Workspace security
Workspace security is handled by the MagnoliaAccessProvider
.
See the workspace security section for more details. |
Synchronize workspaces between Magnolia instances
When using Magnolia, you’ll often store content in a variety of workspaces. Typically, these are kept under your magnolia.repositories.home
in the WEB-INF/config/default/magnolia.properties
file. The Content Types module creates node types, workspaces, and namespaces on-the-fly, so when using this, you’ll want to make sure your repository configuration and workspaces are properly synchronized as this on-the-fly feature makes changes to repository configuration files.
The following should be considered when creating a new content type:
π repo |
π magnolia |
π repository |
π datastore |
π meta |
βΈ¬ rootUUID |
π namespaces |
⬩ ns_idx.properties |
⬩ ns_reg.properties |
π nodetypes |
⬩ custom_nodetypes.xml |
⬩ db.mv.db |
π workspaces |
π config |
⬩ db.mv.db |
⬩ workspace.xml |
Item | Notes | ||
---|---|---|---|
Namespace definitions |
Found in the Please copy your custom one to the target environment for its synchronization. |
||
Node type definitions |
Custom node type definitions are stored in the
|
||
Workspace configuration |
Your workspace configuration stores the detailed workspace configuration in the
|
||
Index and lock |
You can remove all files and folder under the Why is this important?
This ensures repository consistency and cleans up all unsynchronized indexes. For content synchronization, this folder should not be copied over different instances. It need to be cleaned up in the target instance instead. |
||
The actual content |
The actual content is typically stored in your configured database tables with the name prefix according to "schemaObjectPrefix" name where For example
|