POST to Elastic Search as and int

Hi Guys,

Im just wondering if anyone has been able to POST an integer to ES, using JSON. I have tried a few different ways of doing with no success, The data is ingested but always as a string. does anyone has any hints they would be able to proved, or advice on if this is even possible ?

Different syntax I have tired (yes some are stupidly wrong)

{
"Temp": "{{data}}",
"Temp2": "{data}",
"Temp3": "[data]",
"Temp4": "[{data}]",
"Temp5": {
"data": {
"type": "integer"
}
},
"Time": "published_at",
"convert": {
"temp6": "data",
"type": "integer"
}
}

any help would be awesome .... im running out of ideas !

cheers
Connor

Are you posting the above json, exactly as you have it?

Yes, but I'm using a third party device to do the actual POST to SERVERNAME:9200/my_index/my_type/1

But you're posting text where you want an int?

You are correct,

Sorry I forgot I have also tried it as
"Temp": {{data}},
"Temp2": {data}

Well we can't help with whatever is posting the data.

But what does a document show is in those fields if you look at it in Discover?

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