Default search configuration

By default, Magnolia’s search functionality is provided by the Jackrabbit repository which uses the default Lucene algorithm to calculate the score for ranking results. For more advanced search options and especially if you need to manage high volumes of assets, you can set up Magnolia to use Apache Solr search.

Jackrabbit enables you to control which properties of a node are indexed and how much they will affect the jcr:score value which represents the full-search score of the node serving as a measure of that node’s relevance to the full-text search expression result. Once those properties are defined in the index configuration file, Lucene calculates how to index the content of a workspace.

Lucene

Magnolia’s search works using the Lucene algorithm where by default all properties mentioned in the index-rule receive a boost value of 1.0.

For example: //*[jcr:contains(.,'apache')] order by @jcr:score descending

jcr:score Text property

1000

"Apache Jackrabbit"

848

"some test jackrabbit apache, apache is great"

350

"this is a text that is much larger than the first one and only contains the word apache once."

While all workspaces have the mgnl:tags property indexed, not all of them have the same configuration:

  • Pages : the title properties receive a boost of 3.0. The components and areas node contents are also included in the mgnl:page when the search index is evaluated.

  • DAM: the mgnl:resource node content is included in the mgnl:asset when the search index is evaluated.

  • Tasks: the mgnl:contentNode content is included in the mgnl:task when the search index is evaluated.

Feedback

DX Core