Plugin indexing interface

The plugin indexing interface provides indexing-related functionality for plugins, including the ability to read and set a range of configuration options that apply during indexing such as metadata, gscopes and kill patterns.

Enabling indexing functionality

In order to access any of the indexing functionality, your plugin must include an implementation of the IndexingConfigProvider interface.

The java file for this will be created automatically when you first create your plugin if you answer true to the question about indexing:

Define value for property 'indexing' (should match expression '^(?i)(true|false)$'): true

This will create two files: PLUGIN-NAMEIndexingConfigProvider.java and PLUGIN-NAMEIndexingConfigProviderTest.java in the source tree for your new plugin.

If you need to add indexing to an existing plugin and did not include indexing when the plugin was created the simplest way to add this is:

  1. Run the plugin creation tool to create a new plugin, ensuring that this plugin has the indexing property set to true.

  2. Copy and rename the two files src/main/java/PACKAGE-NAME/PLUGIN-NAMEIndexingConfigProvider.java and src/test/java/PACKAGE-NAME/PLUGIN-NAMEIndexingConfigProviderTest.java to corresponding locations within your plugin. Within these files update the class name to be correct for your plugin.

  3. Edit the file src/main/java/resources.PLUGIN-NAME.properties and add a line to the file:

    com.funnelback.plugin.index.IndexingConfigProvider=CLASS-NAME-OF-INDEXING-PROVIDER

Once this is set up you can add indexer functionality to your plugin.

Usage

Once the plugin is enabled on a data source, the implemented plugin methods will be executed during the next data source update.

Logging

As the plugin will be run during a data source update, logging from above methods will appear in the data source’s indexer logs.