Class NumberFormatTransformer
- java.lang.Object
-
- org.apache.solr.handler.dataimport.Transformer
-
- org.apache.solr.handler.dataimport.NumberFormatTransformer
-
public class NumberFormatTransformer extends Transformer
A
Transformer
instance which can extract numbers out of strings. It usesNumberFormat
class to parse strings and supports Number, Integer, Currency and Percent styles as supported byNumberFormat
with configurable locales.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
-
-
Constructor Summary
Constructors Constructor Description NumberFormatTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
FORMAT_STYLE
public static final String FORMAT_STYLE
- See Also:
- Constant Field Values
-
LOCALE
public static final String LOCALE
- See Also:
- Constant Field Values
-
NUMBER
public static final String NUMBER
- See Also:
- Constant Field Values
-
PERCENT
public static final String PERCENT
- See Also:
- Constant Field Values
-
INTEGER
public static final String INTEGER
- See Also:
- Constant Field Values
-
CURRENCY
public static final String CURRENCY
- See Also:
- Constant Field Values
-
-
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 classTransformer
- Parameters:
row
- A row of datacontext
- 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
>>
-
-