-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Elasticsearch version:
"number": "5.1.1",
"build_hash": "5395e21",
"build_date": "2016-12-06T12:36:15.409Z",
"build_snapshot": false,
"lucene_version": "6.3.0"
Plugins installed: []
JVM version:
java version "1.8.0_101"
OS version:
Windows 10
Description of the problem including expected versus actual behavior:
During some application testing using ingest pipeline processors, we noticed when trying to convert a string that represented a dollar amount to a double, it was not allowed. We noticed then that convert restricts to only : integer, float, string, boolean, and auto. I would hope that we might be able to update this to support the other datatypes that are acceptable.
IE. long, double, short, byte at a minimum.
Steps to reproduce:
- Create a simulate pipeline:
POST _ingest/pipeline/_simulate
{
"pipeline": {
"description": "This would be used to map numeric strings to there equivalent int",
"processors": [
{
"convert": {
"field": "num_emp",
"type": "integer"
}
},
{
"convert": {
"field": "salary_midpoint",
"type": "double"
}
}
]
},
"docs": [
{
"_index": "test",
"_source": {
"num_emp": "2",
"salary_midpoint": "195000.0"
}
}
]
}
Provide logs (if relevant):
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "[type] type [double] not supported, cannot convert field.",
"header": {
"processor_type": "convert",
"property_name": "type"
}
}
],
"type": "parse_exception",
"reason": "[type] type [double] not supported, cannot convert field.",
"header": {
"processor_type": "convert",
"property_name": "type"
}
},
"status": 400
}