This folder contains examples of indexing stages implemented with the SDK.
This documentation and examples use Gradle for building index stage plugins. If required alternative build tools can be used for building plugins.
See Gradle quickstart for Java Projects.
The minimal project layout is as follows:
my-index-stage
├── build.gradle
├── gradle.properties
├── settings.gradle
└── src
└── main
└── java
└── MyIndexStageConfig.java
└── MyIndexStage.java
This is a typical Gradle build file. It should at least include com.lucidworks-plugins.index-stage-sdk:index-stage-plugin-sdk
library and allow to create a plugin zip file.
You can check a complete example here.
This is where Java code lives by default. This location can be changed, but in this documentation we use the Gradle default.
Minimal plugin project must contain a stage class and related configuration. More details about stage and configuration classes can be found at index-stage-plugin-sdk documentation.
Index Stage SDK provides a number of helper classes to simplify unit testing of index stage plugins. To take advantage of the testing framework, plugin project needs to add the following test dependency:
testImplementation "com.lucidworks-plugins.index-stage-sdk:index-stage-sdk-test:1.+"Once the dependency is added, unit test classes can extend com.lucidworks.indexing.sdk.test.IndexStageTestBase and
use provided convenience methods to create test documents, index stage configurations and index stage instances.
Unit test examples can be found here.
Plugin is a zip file that contains:
- Compiled plugin implementation classes packed into jar
- Additional library dependencies jar files used by the plugin
- Plugin manifest (META-INF/MANIFEST.MF). It should contain at least following entries:
Manifest-Version: 1.0Plugin-Id: Id to identify plugin in Fusion's Blob StorePlugin-SDK-Version: Must be compatible with SDK version used by your version of FusionPlugin-Base-Package: Name of the package to scan for stage classes (must be annotated with@Stage)Plugin-Version: Your plugin version
In the provided examples it is generated by assemblePlugin gradle task.