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.
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
Define value for property 'indexing' (should match expression '^(?i)(true|false)$'): true
This will create two files:
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:
Run the plugin creation tool to create a new plugin, ensuring that this plugin has the indexing property set to true.
Copy and rename the two files
src/test/java/PACKAGE-NAME/PLUGIN-NAMEIndexingConfigProviderTest.javato corresponding locations within your plugin. Within these files update the class name to be correct for your plugin.
Edit the file
src/main/java/resources.PLUGIN-NAME.propertiesand add a line to the file:
Once this is set up you can add indexer functionality to your plugin.
Once the plugin is enabled on a data source, the implemented plugin methods will be executed during the next data source update.
As the plugin will be run during a data source update, logging from above methods will appear in the data source’s indexer logs.