@RootScheme
.
Adding @Property
and type annotations to your stage configuration interface methods defines metadata and type requirements for your plugin configuration fields. This is similar to Fusion’s connector configuration schema.
.zip
file that contains one or more index stage implementations. The file contains .jar
files for stage definitions and additional dependencies. It also contains a manifest file that holds the metadata Fusion uses to run the plugin.
Plugins are uploaded to the Blob store:
com.lucidworks.indexing.api.IndexStage
interface and be annotated with com.lucidworks.indexing.api.Stage
annotation. For additional convenience, stage implementation can extend the com.lucidworks.indexing.api.IndexStageBase
class, which already contains initialization logic and some helpful methods.
IndexStage
instance. After the index stage is created, it is initialized using the init(T config, Fusion fusion)
method. This allows for the creation of internal storage instructions and the validation of the configuration.
Initialization occurs immediately after the stage configuration is saved in Fusion. The stage can be maintained and used by Fusion for extensive periods of time, even if no documents are being processed through the stage. This should be considered when making decisions on resource allocation.
process
method for each document the index pipeline processes.
In most use cases, index stages process a single input document and emit a single output document. For these cases, the process(Document document, Context context)
method should be used.
In other cases, index stages process a single input document but emit multiple output documents. For these cases, the process(Document document, Context context, Consumer<Document> output)
method should be used. The output documents are sent by calling output.accept(doc)
.
A single stage instance can be used to process multiple documents, and the process
method can be called from multiple concurrently running threads. Additionally, Fusion can initialize and maintain multiple stage instances with the same configuration in separate indexing service nodes. Therefore, it’s important to ensure the plugin stage implementation is thread-safe and the processing logic is stateless.