Plugin filter interface

Introduction

A plugin can implement one or more document filters which enable documents to be manipulated before they are indexed by Funnelback.

Jsoup filters can also be implemented for plugins using the Jsoup filter interface.

Interface methods

Each filter implemented by the plugin must extend one of the Funnelback’s three filter interfaces: StringDocumentFilter, BytesDocumentFilter or Filter.

The process of implementing a filter for use with a plugin is the same as writing a general document filter, however it must be written in pure java rather than in Groovy.

Usage

To use a filter from a plugin, you must first enable the plugin to make it available on the class path. Next, you can add a filter to the filter chain of the collection to specify when it runs.

For example, to use the ExampleStringFilter from the exampleplugin:

filter.classes=JSoupProcessingFilterProvider:DocumentFixerFilterProvider:com.funnelback.plugin.exampleplugin.ExampleStringFilter
each plugin that implements this interface should mention the class name to use in the plugin documentation.

Logging

Log messages for filtering will appear in the gatherer’s filter logs.

© 2015- Squiz Pty Ltd