-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Support for BigInteger and BigDecimal #17006
Copy link
Copy link
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>featureMetaTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchdiscuss
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>featureMetaTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchdiscuss
Type
Fields
Give feedbackNo fields configured for issues without a type.
Lucene now has sandbox support for BigInteger (LUCENE-7043), and hopefully BigDecimal will follow soon. We should look at what needs to be done to support them in Elasticsearch.
I propose adding
big_integerandbig_decimaltypes which have to be specified explicitly - they shouldn't be a type which can be detected by dynamic mapping.Many languages don't support big int/decimal. Javascript will convert to floats or throw an exception if a number is out of range. This can be worked around by always rendering these numbers in JSON as strings. We can possibly accept known bigints/bigdecimals as numbers but there are a few places where this could be a problem:
The above could be worked around by telling Jackson to parse floats and ints as BIG* (
USE_BIG_DECIMAL_FOR_FLOATSandUSE_BIG_INTEGER_FOR_INTS) but this may well generate a lot of garbage for what is an infrequent use case.Alternatively, we could just say that Big* should always be passed in as strings if they are to maintain their precision.