public class TemplateTransformer extends Transformer
A Transformer which can put values into a column by resolving an expression
containing other columns
For example:
<field column="name" template="${e.lastName}, ${e.firstName}
${e.middleName}" /> will produce the name by combining values from
lastName, firstName and middleName fields as given in the template attribute.
Refer to http://wiki.apache.org/solr/DataImportHandler for more details.
This API is experimental and may change in the future.
| Constructor and Description |
|---|
TemplateTransformer() |
| Modifier and Type | Method and Description |
|---|---|
Object |
transformRow(Map<String,Object> row,
Context context)
The input is a row of data and the output has to be a new row.
|
public static final String TEMPLATE
public Object transformRow(Map<String,Object> row, Context context)
TransformertransformRow in class Transformerrow - A row of datacontext - The current contextMap<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>>Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.