Package com.lucidworks.indexing.api
Class IndexStageBase<T extends IndexStageConfig>
- java.lang.Object
-
- com.lucidworks.indexing.api.IndexStageBase<T>
-
- Type Parameters:
T- index stage configuration class
- All Implemented Interfaces:
IndexStage<T>
public abstract class IndexStageBase<T extends IndexStageConfig> extends java.lang.Object implements IndexStage<T>
Convenient base class for index pipeline stage containing default initialization logic. Extend this class to implement custom index pipeline stage:@Stage(type = "myStage", configClass = MyStageConfig.class) public class MyStage extends IndexStageBase<MyStageConfig> { @Override public Document process(Document document, Context context) { // get configuration String myBlobId = config.myBlobdId(); // call Fusion API methods fusion.blobs().getBlobContent(myBlobId); // further document processing logic } }
-
-
Constructor Summary
Constructors Constructor Description IndexStageBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(T config, Fusion fusion)Stage initialization callback.DocumentnewDocument()DocumentnewDocument(java.lang.String id)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.lucidworks.indexing.api.IndexStage
process, process
-
-
-
-
Field Detail
-
fusion
protected Fusion fusion
-
config
protected T extends IndexStageConfig config
-
-
Method Detail
-
newDocument
public Document newDocument()
-
newDocument
public Document newDocument(java.lang.String id)
-
init
public void init(T config, Fusion fusion)
Description copied from interface:IndexStageStage initialization callback. This method will be called by Fusion when index stage instance is created and before 'process' method is called. Stage configuration will be passed by Fusion asIndexStageConfiginstance. AdditionallyFusioninterface instance will be passed to allow calling Fusion API from the index stage.- Specified by:
initin interfaceIndexStage<T extends IndexStageConfig>- Parameters:
config- index pipeline stage configurationfusion- Fusion API instance
-
-