Package com.lucidworks.querying.api
Class QueryStageBase<T extends QueryStageConfig>
java.lang.Object
com.lucidworks.querying.api.QueryStageBase<T>
- Type Parameters:
- T- query stage configuration class
- All Implemented Interfaces:
- QueryStage<T>
public abstract class QueryStageBase<T extends QueryStageConfig>
extends Object
implements QueryStage<T>
Convenient base class for query pipeline stage containing default initialization logic.
 Extend this class to implement custom query pipeline stage:
 
 @Stage(type = "myStage", configClass = MyStageConfig.class)
 public class MyStage extends QueryStageBase<MyStageConfig> {
   @Override
   public QueryRequestAndResponse process(QueryRequestAndResponse query, Context context) {
     // get configuration
     String myBlobId = config.myBlobdId();
     // call Fusion API methods
     fusion.blobs().getBlobContent(myBlobId);
     // further query processing logic
   }
 }
 - 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.lucidworks.querying.api.QueryStageprocess, process, process, process
- 
Field Details- 
fusion
- 
config
 
- 
- 
Constructor Details- 
QueryStageBasepublic QueryStageBase()
 
- 
- 
Method Details- 
initDescription copied from interface:QueryStageStage initialization callback. This method will be called by Fusion when query stage instance is created and before 'process' method is called. Stage configuration will be passed by Fusion asQueryStageConfiginstance. AdditionallyFusioninterface instance will be passed to allow calling Fusion API from the query stage.- Specified by:
- initin interface- QueryStage<T extends QueryStageConfig>
- Parameters:
- config- query pipeline stage configuration
- fusion- Fusion API instance
 
 
-