Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Overview: FarCry Verity

Excerpt

FarCry Verity plugin provides configuration and management services for the ColdFusion implementation of Verity K2 server. This plugin replaces the legacy Verity configuration tools that were in core. FarCry Verity allows you to set up a specific collection for each content type, defining exactly which properties should be searchable. In addition, there are features to allow multiple servers in a cluster manage their own collections, replicating/synchronising the verity configurations. Sample search code is provided, although many users will want to develop their own search interfaces. The plugin also provides logging and reporting of search activity.

Note

FarCry Verity Plugin requires a minimum of FarCry v4.07 to function.

Info

An alternative FarCry SOLR Plugin is

...

To help you on your way, we've inserted some of our favourite macros on this home page. As you start creating pages, blogging and commenting you'll see the macros below fill up with all the activity in your space.

Navigate space
Section
Column
width60%
Recent updates
Column
width5%
Column
width35%
Page Tree Search
pagetree

also available.

Download

You can grab the latest code base from the FarCry subversion repository:

Installation

5,0,x or 6,0,x Installation

Update the plugin list in your project's ./www/farcryConstructor.cfm file.

Code Block
titleExample ./www/farcryConstructor.cfm

<!--- FARCRY SPECIFIC --->
<cfset THIS.locales = "en_AU,en_US" />
<cfset THIS.dsn = "fullasagoog" /> 
<cfset THIS.dbType = "mssql" /> 
<cfset THIS.dbOwner = "dbo." /> 
<cfset THIS.plugins = "farcryblog,farcrycfimage,farcryverity,farcrydoc" /> 

4,0,x Installation

Add farcryverity to your plugin list in the farcryinit tag of your project's Application.cfm:

Code Block
title./www/Application.cfm

<farcry:farcryInit
  name="daemon"
  dbType="mssql"
  plugins="farcrycms,farcryverity,googleMaps" />

Configuration

Then you need to configure the Verity collection storage path and hosts to be managed in your _serverSpecific Vars.cfm configuration file:

Code Block
titleFor example, ./config/_serverSpecificVars.cfm

<cfsetting enablecfoutputonly="true" />
<!--- setup environment variables for specific developers/machines/servers --->
<cfset machineName = createObject("java", "java.net.InetAddress").localhost.getHostName() />

<!--------------------------------------------
PRODUCTION ENVIRONMENT
--------------------------------------------->
<!--- set verity plugin config --->
<cfset application.stplugins.farcryverity.storagePath="C:\Inetpub\verity\collections" />
<cfset application.stplugins.farcryverity.lhosts = machinename />

<cfsetting enablecfoutputonly="false" />

Then simply reinitialise your application and login to the webtop. You'll find the administration screens under: ADMIN > Verity Plugin

Note
titleVerity Default Configuration

If you don't specify a collection path and lhosts you will get the following defaults:

  • collection path; C:\coldfusionverity\collections
  • lhosts; createObject("java", "java.net.InetAddress").localhost.getHostName()

How To Use

A nice feature of verity plugin is the ability to override what content gets indexed. This is achieved by writing a custom function within the content type that starts with contentToIndex

For example, a custom function to allow the ability to restrict content to only show published content (to allow forward publishing)

Code Block
titleFor example, within an extended ./myproject/packages/types/dmNews.cfc

<cffunction name="contentToIndex" returntype="query" description="Gets news content to index">

  <cfset qContentToIndex = application.fapi.getContentObjects(typename="dmNews",lProperties="objectid",publishDate_lte=now(),expiryDate_gt=now()) /> 

  <!--- 
  Get CONTENT in earlier versions of FarCry without the wonderful getContentObjects() 
  
  <cfquery name="qContentToIndex" datasource="#application.dsn#">
  select objectid 
  from dmNews
  where status = 'approved' and publishdate <= getdate()
  </cfquery>
  --->

  <cfreturn qContentToIndex>

</cffunction>

You can actually add multiple functions to the same content type which will then allow you to choose the function you want when you create the verity collection. Simply prefix them with contentToIndex*

For example, contentToIndexTest and contentToIndexMyCategory.