ScriptTransformer (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.dataimport.ScriptTransformer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.handler.dataimport
Class ScriptTransformer

    java.lang.Object
      org.apache.solr.handler.dataimport.Transformer
          org.apache.solr.handler.dataimport.ScriptTransformer

    public class ScriptTransformer

extends Transformer

A `Transformer` instance capable of executing functions written in scripting languages as a `Transformer` instance.

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
Version:
  $Id: ScriptTransformer.java 1303464 2012-03-21 16:50:38Z jdyer $

Constructor Summary
`ScriptTransformer()`

Method Summary
`String` | `getFunctionName()`
`void` | `setFunctionName(String methodName)`
`Object` | `transformRow(Map<String,Object> row, Context context)` The input is a row of data and the output has to be a new row.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ScriptTransformer

    public ScriptTransformer()

Method Detail

### transformRow

    public Object transformRow(Map<String,Object> row,
                               Context context)

  Description copied from class: `Transformer`
  The input is a row of data and the output has to be a new row.

  Specified by:
    `transformRow` in class `Transformer`
  Parameters:
    `row` - A row of data
    `context` - 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 a `List`<`Map`<`String`, `Object`>>

### setFunctionName

    public void setFunctionName(String methodName)

### getFunctionName

    public String getFunctionName()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD