Skip to main content
In addition to Fusion’s built-in query stages, Lucidworks provides the Query Stage SDK for developing your own custom query stages with Java. All of the resources are provided in a public GitHub repository.

Get started

Clone the repository to get started:
git clone https://github.com/lucidworks/query-stage-sdk
Ensure you are using the correct SDK version for your Fusion version:
Fusion versionsQuery Stage SDK versionRequired JDK
5.9.152.0.011
5.4.0 through 5.9.141.0.08
See Gradle quickstart documentation for more information on Java Projects.
The Query Stage SDK requires use of the Fusion Search DSL, which is deprecated as of Fusion 5.9.4.

Query Stage SDK library

The Java SDK library contains the classes and interfaces for building new query plugin stages. It is located in the query-stage-plugin-sdk directory.

Example plugin stage

The example query stage plugin contains an example of how a plugin can be implemented as well as information on how to build and deploy the plugin. It is located in the examples/sample-plugin-stage directory. The sample plugin stage is an example project with two simple querying stages:
  • UpdateRequestStage.java - Add a new query parameter with a specific value to each query request.
  • UpdateResponseStage.java - Add a new field with a specific value to each query response.
This is also a demonstration of a basic Gradle project that assembles a Fusion query stage plugin ZIP file.

1. Build the plugin stage

From the main folder, call:
./gradlew -p examples/sample-plugin-stage assemblePlugin
Substitute the path to your project. This creates a plugin .zip file (with required manifest file) inside the build/libs folder.

2. Deploy the stage

You can choose from several different ways to deploy the sample plugin stage:
  • Upload it to the blob store.
  • Use Gradle.
  • Use the REST API.
After successful deployment, new stages should be visible in the Stages list in the Fusion Query Pipelines UI.

Upload it to the blob store

  1. Navigate to System > Blobs.
  2. Click Add.
  3. Select Query Stage Plugin.
  4. Click Browse​ and select your plugin file.
  5. Click Upload

Deploy from the CLI

./gradlew -p examples/sample-plugin-stage deploy -PfusionUser=[user] -PfusionPassword=[password]

Query Stage SDK Javadocs

See the Javadocs for complete details about all packages and classes.
I