Naming Conventions for Groovy Filters

Managed by | Updated .

Groovy filter files location

Funnelback v14.2+

Starting from v14.2 Groovy filters can be placed under a @groovy folder inside the collection configuration folder:

$SEARCH_HOME/conf/<collection>/@groovy/com/organisation/package/.../MyScript.groovy

Older versions

Filters should be placed under the collection configuration folder:

$SEARCH_HOME/conf/<collection>/MyScript.groovy

Filters should be symlinked to $SEARCH_HOME/lib/java/groovy/com/organisation/package/... folder:

ln -s $SEARCH_HOME/conf/<collection>/MyScript.groovy $SEARCH_HOME/lib/java/groovy/com/organisation/package/.../MyScript.groovy  

File naming & directories

The name of the file should use the CamelCase syntax: begins with uppercase, every new word thereafter begins with uppercase eg: ExtractCountryMetadata.groovy.

The name of the package can only be lower case letters and numbers (no dashs or other symbols).

The name of the package should match the script location, and the name of the class should match the name of the file. Failure to follow this rule might cause class loading issues.

$SEARCH_HOME/lib/java/groovy/com/organisation/package/filters/ExtractCourses.groovy
package com.organisation.packages.filters;
 
class ExtractCourses {
  // ...
}

Additional Resources

Was this artcle helpful?

Comments