Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A generic Magnolia configuration is used for all workspaces. This configuration fine-tunes the default Jackrabbit search configuration for best results. The sections that follow detail the enhancements.

...

(warning) Magnolia 5.5.9+:  The generic indexing configuration used for all workspaces but the website workspace is stored in /info/magnolia/jackrabbit/indexing_configuration_default.xml . The indexing configuration for the website workspace is in /info/magnolia/jackrabbit/indexing_configuration_website.xml .

...

You can configure indexing for additional workspaces by setting the workspace name

in <param name="indexingConfiguration" value="/info/magnolia/jackrabbit/indexing_configuration_${wsp.name}.xml"/> in the workspace.xml configuration file.

(info) If you are updating your Magnolia to 5.5.9 or later, we recommend you to set the indexing configuration by specifying workspace name(s) in the indexingConfiguration parameter.

These configurations fine-tune the default Jackrabbit search configuration for best results. The sections that follow detail the enhancements.

 Special characters

Tip

Jackrabbit stores all character data (node names and values) in Unicode. This ensures that special characters such as accents and umlauts are indexed and can be used in search. Issues with special characters are often due to character set conversion problems in the application server. See URI encoding in Tomcat for more.

Excluding nodes

Magnolia typically stores many properties, such as author, modification dates, templates etc., that are not relevant in search results. To minimize the index and speed-up search, all properties starting with jcr: or  mgnl: are excluded from the index. This means you get fewer results but those results are more relevant.

Code Block
languagexml
<index-rule nodeType="nt:base

 Special characters

Tip

Jackrabbit stores all character data (node names and values) in Unicode. This ensures that special characters such as accents and umlauts are indexed and can be used in search. Issues with special characters are often due to character set conversion problems in the application server. See URI encoding in Tomcat for more.

Excluding nodes

Magnolia typically stores many properties, such as author, modification dates, templates etc., that are not relevant in search results. To minimize the index and speed-up search, all properties starting with jcr: or  mgnl: are excluded from the index. This means you get fewer results but those results are more relevant.

Code Block
languagexml
<index-rule nodeType="nt:base">
    <property isRegexp="true" nodeScopeIndex="false">mgnl:.*</property>
    <property isRegexp="true" nodeScopeIndex="false">jcr:.*</property>
    <property isRegexp="true">.*:.*</property>
</index-rule>

...

Code Block
languagesql
SELECT * FROM [nt:base] AS t WHERE 
   ([jcr:primaryType] = 'mgnl:asset' AND 
   [type] <> 'jpg') AND 
   ISDESCENDANTNODE([/example]) 
ORDER BY [t].title asc
Tip

Joins are slow in JCR SQL-2. See Queries in Jackrabbit 2.4.x for issue description and hints.

Security

...

Solr module

...

].title asc
Tip

Joins are slow in JCR SQL-2. See Queries in Jackrabbit 2.4.x for issue description and hints.

Security

Search within Magnolia is access controlled. Search results include only content the user has permission to access. Permissions are controlled through Security. When you execute a query in Magnolia context (

Javadoc
info.magnolia.context.MgnlContext
info.magnolia.context.MgnlContext
), contextual factors such as the current user's permissions are taken into account. If you do not have permission to the items you are querying, they will not show up in the results.

Solr module

For more advanced search options you can use the Solr module. This module uses the  Apache Solr  search platform to index and crawl Magnolia content. Solr is a standalone enterprise search server with a REST like API. Solr uses the Lucene library for full-text indexing and provides advanced features such as faceted search, distributed search and index replication.

(warning) Magnolia 5.5.9+:  The generic indexing configuration used for all workspaces but the website workspace is stored in /info/magnolia/jackrabbit/indexing_configuration_default.xml . The indexing configuration for the website workspace is in /info/magnolia/jackrabbit/indexing_configuration_website.xml . You can configure indexing for additional workspaces by setting the workspace name

in <param name="indexingConfiguration" value="/info/magnolia/jackrabbit/indexing_configuration_${wsp.name}.xml"/> in the workspace.xml configuration file.

These configuration fine-tune the default Jackrabbit search configuration for best results. The sections that follow detail the enhancements.

(info) If you are updating your Magnolia to 5.5.9 or later, we recommend you to set the indexing configuration by specifying workspace name(s) in the indexingConfiguration parameter.