public class RegexTransformer extends Transformer
A Transformer
implementation which uses Regular Expressions to extract, split
and replace data in fields.
Refer to http://wiki.apache.org/solr/DataImportHandler for more details.
This API is experimental and may change in the future.
Pattern
Modifier and Type | Field and Description |
---|---|
static String |
GROUP_NAMES |
static String |
REGEX |
static String |
REPLACE_WITH |
static String |
SPLIT_BY |
static String |
SRC_COL_NAME |
Constructor and Description |
---|
RegexTransformer() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
transformRow(Map<String,Object> row,
Context ctx)
The input is a row of data and the output has to be a new row.
|
public static final String REGEX
public static final String REPLACE_WITH
public static final String SPLIT_BY
public static final String SRC_COL_NAME
public static final String GROUP_NAMES
public Map<String,Object> transformRow(Map<String,Object> row, Context ctx)
Transformer
transformRow
in class Transformer
row
- A row of datactx
- 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-2019 Apache Software Foundation. All Rights Reserved.