Plugin gatherer interface


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 collection by enabling the plugin on that collection.

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 collection configuration settings.

  • store defines where the gathered documents are stored.


A plugin’s gatherer can only be used from a custom collection. If a custom collection 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 collection configuration settings.


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

© 2015- Squiz Pty Ltd