Class RegexTransformer
- java.lang.Object
-
- org.apache.solr.handler.dataimport.Transformer
-
- org.apache.solr.handler.dataimport.RegexTransformer
-
public class RegexTransformer extends Transformer
A
Transformerimplementation 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.
- Since:
- solr 1.3
- See Also:
Pattern
-
-
Field Summary
Fields Modifier and Type Field Description static StringGROUP_NAMESstatic StringREGEXstatic StringREPLACE_WITHstatic StringSPLIT_BYstatic StringSRC_COL_NAME
-
Constructor Summary
Constructors Constructor Description RegexTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
REGEX
public static final String REGEX
- See Also:
- Constant Field Values
-
REPLACE_WITH
public static final String REPLACE_WITH
- See Also:
- Constant Field Values
-
SPLIT_BY
public static final String SPLIT_BY
- See Also:
- Constant Field Values
-
SRC_COL_NAME
public static final String SRC_COL_NAME
- See Also:
- Constant Field Values
-
GROUP_NAMES
public static final String GROUP_NAMES
- See Also:
- Constant Field Values
-
-
Method Detail
-
transformRow
public Map<String,Object> transformRow(Map<String,Object> row, Context ctx)
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 datactx- 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>>
-
-