Skip to content

Commit

Permalink
Corrected the datatype of DoubleRange
Browse files Browse the repository at this point in the history
Without this change, Elasticsearch will return the following exception:

elasticsearch.exceptions.RequestError: RequestError(400, 'mapper_parsing_exception', 'No handler for type [double_ranged] declared on field [my_range]’)

This is because according to the documentation, this datatype is actually called `double_range` not `double_ranged`. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html
  • Loading branch information
braunsonm authored and honzakral committed Nov 16, 2019
1 parent cf48957 commit 0e4e79e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elasticsearch_dsl/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class LongRange(RangeField):
_core_field = Long()

class DoubleRange(RangeField):
name = 'double_ranged'
name = 'double_range'
_core_field = Double()

class DateRange(RangeField):
Expand Down

0 comments on commit 0e4e79e

Please sign in to comment.