Index Stage SDK

Lucidworks provides an Index Stage SDK in a public repository on GitHub with all the resources you need to develop custom index stages with Java.

Clone the repository to get started:

git clone

See Gradle quickstart documentation for more information on Java Projects.


Project layout

The minimal project layout:

    ├── build.gradle
    ├── settings.gradle
    └── src
        └── main
            └── java

Gradle build file

At a minimum the build.gradle file must include com.lucidworks-plugins.index-stage-sdk:index-stage-plugin-sdk. See the Github repository for a complete example.

Java code location

The default location for the Java code is in src/main/java. Although this location can be changed, the examples use the default location.

Minimum plugin requirements

At a minimum, a plugin must contain a stage class and its related configuration. See Index Stage SDK concepts for more information on plugins.

Plugin manifest

At a minimum, the plugin manifest file should contain the following:

Parameter Description


The version number of the manifest.


The ID that Fusion’s Blob Store uses to identify the plugin.


The SDK version of the plugin. This must be compatible with your Fusion version.


The name of the package that will be scanned for stage classes. These classes must be annotated with @Stage.


The version number of the plugin.

See the example below for more information.


This documentation uses a Gradle task, assemblePlugin, to build index stage plugins. Alternatively, plugins can be built with any build tool, assuming the file and directory structure is correct.

Creating a custom META-INF/MANIFEST.MF file

Manifest-Version: 1.0
Plugin-Id: sample-plugin
Plugin-SDK-Version: 1.0.0
Plugin-Base-Package: com.lucidworks.sample
Plugin-Version: 0.0.1

Simple stage configuration schema definition

    title = "Simple",
    description = "Simple Index Stage"
public interface SimpleStageConfig extends IndexStageConfig {

      title = "Field",
      description = "Name of field to add to document.",
      required = true
  @StringSchema(minLength = 1)
  String newField();

      title = "Text",
      description = "Sample text to put into the field."
  String text();

Custom index stage implementation

@Stage(type = "simple", configClass = SimpleStageConfig.class)
public class SimpleStage extends IndexStageBase<SimpleStageConfig> {

  private static final Logger logger = LoggerFactory.getLogger(SimpleStage.class);

  public Document process(Document document, Context context) {
    String text = StringUtils.trim(config.text());

    document.field(config.newField(), String.class).set(text).type(Types.STRING);

    return document;


public class MyStage extends IndexStageBase<MyStageConfig> {

  private static final Logger logger = LoggerFactory.getLogger(MyStage.class);

  public Document process(Document document, Context context) {
    // ......"Processing document with id '{}'", document.getId());
    // ......