Versions Compared

Key

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

...

Tip

To keep the memory footprint for the Result Ranker on a minimum level, use the JcrUserRoleNetworkStorageStrategy class and do not assign the role ranker. Make sure that you have only a few users with the superuser role.


Custom ranking

You can develop your own custom result-ranking strategy. To do this, create a custom class that implements RankingNetworkStorageStrategy and set the class property in the configuration accordingly.

Result Ranker memory size

You can globally configure the memory size of neural networks. To do so, adjust the outputUnits value. The default memory size is 10000; this value represents the maximum number of Find Bar search results that can be stored and ranked in networks.

Large networks can store more results but use up more memory, while small networks consume less memory but might lose stored results to free up additional memory. Results are removed from networks based on a least-recently-used policy. This ensures that frequent results remain in memory irrespective of when they were added to the networks. You may want to configure the memory size of networks depending on the Result Ranker strategy.

When you change the outputUnits value (e.g. from 10000 to 1000), you need to clean up the JCR rankings workspace. Otherwise, an error will appear when you select a search result. This is because the networks loaded into memory were created using a configuration that no longer exists, rendering any stored results obsolete. When you change the outputUnits value, make sure that you delete any stored networks and log into the Magnolia instance again to regenerate networks using the new configuration (see Clearing Result Ranker memory).