Return numerical values without quotes


(Blekfet) #1

Hi!

I have an elasticsearch installation with numerical mappings. The problem is that i can't control what is inserted. And the insertions are putting the numbers within quotes.

When I query the index these values are also returned with quotes. Is it possible to change a setting or mapping to return the numerical value without the quotes?

Some client application are requiering that the data is formated as numerical JSON.

Thanks,
/blekfet


(Mark Walkom) #2

They're being converted to strings?


(Blekfet) #3

An insertion of "4.0" would give back "4.0".
An insertion of 4.0 would give back 4.

The mapping for the field is a float. Can this be sovled easily?


(Christian Dahlqvist) #4

Elasticsearch does not modify the document source, so I believe the fact that you get back what you inserted in expected. You should really address this before you index the documents.


(system) #5

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