Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Introduction

These tips for customising FarCry Solr are for use with FarCry 6.0.9.

Why use solr? Well, you can hear the author give solr a good wrap: http://www.2ddu.com/2011/03/26/episode-3-we-exhaust-geoff-bowers/. Solr discussion starts at about 42 minutes in of the podcast.

If you are looking for documentation for FarCry Solr, have a look at the FarCry Verity documentation. FarCry Solr seems to be modelled from the FarCry Verity plugin. The following tips assume you have read the FarCry Verity documentation.

Installation

Install the FarCry Solr plugin by adding the plugin name to the list of plugins in your projects' farcryConstructor.cfm. Update the comma separated list in the "THIS.plugins" variable. For example <cfset THIS.plugins = "farcrycms,farcrysolr" />. Note that plugins are loaded in the order listed. In this example, farcrysolr would be loaded last, after the farcrycms plugin.

Configuration

Once you have installed the FarCry Solr plugin, the collection storage path can be managed in the webtop. Under the Admin tab select the General Admin -> Configuration -> Edit Config -> Solr Search -> Storage Path.

The solr collection configuration can also be managed from the webtop. Under the Admin tab, use the drop down list (defaults to "General Admin") and select the newly added option called "Solr Search Services." If you do not see Solr Search Services, try refreshing your application scope using the Admin drop down selection called "Developer Utilities."

A new scheduled task template is installed with the FarCry Solr plugin called "Update solr Collections (farcrysolr plugin)." Add a new scheduled task and select the new template from the drop down list.

How To Use

The contentToIndex function can be overridden in your custom type or type extension. If you just want a single custom contentToIndex function, then call it contentToIndex. This is the default value that is stored in farSolrCollection.contentToIndexFunction. If you add a single custom function using a different name (say contentToIndexTest) then your function will be ignored. The collection edit interface only lets you choose from custom contentToIndex* functions if there are more than one (see webskin/farSolrCollection/edit.cfm line 99). Adding a second custom contentToIndex function (say contentToIndexProd) will allow you to select which custom function is used when an update is done.

Your custom contentToIndex function also needs the displayname attribute to be set. It may be the same value as the name attribute. The value in the displayname attribute is used for the drop down list display (see packages/types/farSolrCollection.cfc line 102).

  • No labels