Not able to convert float to integer using convert processor


(R_C) #1

Hi ,

I first defined a pipeline as follows -
curl -X PUT "node1:9200/_ingest/pipeline/convertpipeline" -H 'Content-Type: application/json' -d' { "description": "convert type pipeline", "processors" : [ { "convert": { "field" : "number", "type": "integer" } } ] } '

Then i tested using the following -

curl -X PUT "node1:9200/myindex/doc/1?pipeline=convertpipeline" -H 'Content-Type: application/json' -d'
{
  "number" : "15.88"
}
'

and

` curl -X PUT "node1:9200/myindex/doc/1?pipeline=convertpipeline" -H 'Content-Type: application/json' -d'
{
  "number" : 15.88
}
'`

It failed to covert float to integer .. ?? Any help on how and why ??

Thanks


(James Barwick) #2

Because the template still has it as keyword/string on the index?
(i've never used convertpipeline).
I ususally do this by changing the template, then reindex the index.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.