Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating point uses float instead of double #2003

Closed
gmarz opened this issue Apr 5, 2016 · 1 comment
Closed

Floating point uses float instead of double #2003

gmarz opened this issue Apr 5, 2016 · 1 comment
Assignees
Labels

Comments

@gmarz
Copy link
Contributor

gmarz commented Apr 5, 2016

We need to ensure AutoMap() also adheres to this.

https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_50_mapping_changes.html#_floating_points_use_literal_float_literal_instead_of_literal_double_literal

Should this be considered breaking?

@russcam
Copy link
Contributor

russcam commented Apr 19, 2016

It's breaking because the default mapping for a number type is now float and no longer double, so going from double precision floating point to single precision floating point. This breaks the default NumberType for the NumberAttribute, NumberProperty and also the ContentLengthField on AttachmentProperty (which uses NumberProperty).

I think we're OK with auto mapping generally because if you specify a property as type double, mapping inference will map it as a double, and likewise for float; if you specify float, it'll be mapped as a float.

Overriding auto mapping using .Properties() is also a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants