Transformer (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.dataimport.Transformer 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 Transformer

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

Direct Known Subclasses:
  ClobTransformer, DateFormatTransformer, HTMLStripTransformer, LogTransformer, NumberFormatTransformer, RegexTransformer, ScriptTransformer, TemplateTransformer

    public abstract class Transformer

extends Object

Use this API to implement a custom transformer for any given entity

Implementations of this abstract class must provide a public no-args constructor.

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: Transformer.java 1044562 2010-12-11 02:24:12Z koji $

Constructor Summary
`Transformer()`

Method Summary
`abstract 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

### Transformer

    public Transformer()

Method Detail

### transformRow

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

  The input is a row of data and the output has to be a new row.

  Parameters:
    `context` - The current context
    `row` - A row of data
  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`>>

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