Class ScriptTransformer
- java.lang.Object
-
- org.apache.solr.handler.dataimport.Transformer
-
- org.apache.solr.handler.dataimport.ScriptTransformer
-
public class ScriptTransformer extends Transformer
A
Transformerinstance capable of executing functions written in scripting languages as aTransformerinstance.Refer to http://wiki.apache.org/solr/DataImportHandler for more details.
This API is experimental and may change in the future.
- Since:
- solr 1.3
-
-
Constructor Summary
Constructors Constructor Description ScriptTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFunctionName()voidsetFunctionName(String methodName)ObjecttransformRow(Map<String,Object> row, Context context)The input is a row of data and the output has to be a new row.
-
-
-
Method Detail
-
transformRow
public Object transformRow(Map<String,Object> row, Context context)
Description copied from class:TransformerThe input is a row of data and the output has to be a new row.- Specified by:
transformRowin classTransformer- Parameters:
row- A row of datacontext- The current context- Returns:
- The changed data. It must be a
Map<String,Object> if it returns only one row or if there are multiple rows to be returned it must be aList<Map<String,Object>>
-
setFunctionName
public void setFunctionName(String methodName)
-
getFunctionName
public String getFunctionName()
-
-