Plugin gatherer interface

Introduction

The PluginGatherer interface enables a custom gatherer to be defined for a plugin.

This plugin can then be used as the custom gatherer for a custom data source by enabling the plugin on that data source.

Interface methods

The PluginGatherer interface must be implemented for a plugin to provide gathering functionality.

The PluginGatherer interface has a single method:

void gather(PluginGatherContext pluginGatherContext, PluginStore store) throws Exception;
  • pluginGatherContext provides access to SEARCH_HOME and data source configuration settings.

  • store defines where the gathered documents are stored.

Usage

A plugin’s gatherer can only be used from a custom data source. If a custom data source imports multiple plugins that implement custom gathering then you will need to specify which gatherer to use.

Example: MockGatherer plugin

The MockGatherer plugin implements a PluginGatherer that fetches a number of URLs via HTTP and stores the documents.

Example: Custom gatherer plugin

The custom gatherer plugin generates a set of documents from data source configuration settings.

Logging

Log messages from the gather method will appear in the data source’s gatherer logs.

© 2015- Squiz Pty Ltd